-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (30 loc) · 724 Bytes
/
Makefile
File metadata and controls
34 lines (30 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
ROOTPATH=$(shell pwd)
CONF=$(ROOTPATH)/conf
WWWROOT=$(ROOTPATH)/wwwroot
RELEASE=$(ROOTPATH)/release
CFLAGS=-D_DEBUG_
LDFLAGS=-lpthread
BIN=httpd
SRC=$(wildcard *.cpp)
OBJ=$(patsubst %.cpp,%.o,$(SRC))
WARNINGS=-Wall
$(BIN):$(OBJ)
$(CXX) $^ -o $@ $(LDFLAGS) -O3
%.o:%.c
$(CXX) -c $< $(LDFLAGS)
.PHONY:clean install
clean:
@cd cgi;make clean;
@cd sql_cgi;make clean;
@rm -rf $(OBJ) $(BIN) $(RELEASE)
@rm -rf tmp/*
install:
@cd cgi;make;
@cd sql_cgi; make;
@mkdir -p $(WWWROOT)/cgi-bin
@mkdir -p $(RELEASE)
#@cp $(ROOTPATH)/sql_cgi/xxxxxx $(WWWROOT)/cgi-bin
@cp $(ROOTPATH)/cgi/calculator $(WWWROOT)/cgi-bin
@cp $(ROOTPATH)/cgi/compiler $(WWWROOT)/cgi-bin
@cp -r $(WWWROOT) $(RELEASE)
@cp httpd $(RELEASE)