-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (31 loc) · 973 Bytes
/
Makefile
File metadata and controls
43 lines (31 loc) · 973 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
35
36
37
38
39
40
41
42
43
dependdir := $(shell ls .depend >/dev/null 2>&1)
ifneq ($(dependdir), .depend)
dependdir := $(shell touch .depend)
endif
CC=g++
GCC=gcc
COMP_PARA=-g -Wall -c -D__MULITI_THREAD__ -D__DEBUG__ -DNDEBUG -D_LINUX -D_mt -DMONGO_HAVE_STDINT \
-DMONGO_HAVE_UNISTD -DMONGO_USE__INT64 -DMONGO_USE_LONG_LONG_INT #-DMONGO_BIG_ENDIAN
LINK_PARA=-mt #-pg
INCS=-I/usr/local/include -I/usr/include/ -I../../../interface/
LIBS= -L ../../../libs/ -lnskernel -lbase -lcrypto -lpthread -lz
OBJS = demo.o svc.o main.o
TARGET=demo
all : $(TARGET)
demo: $(OBJS)
$(CC) $(LINK_PARA) -o $@ $^ $(LIBS)
cp -f $@ ../bin
test: $(TESTOBJS)
$(CC) $(LINK_PARA) -o test $^ $(LIBS)
cp -f $@ ../bin
.cpp.o :
${CC} ${COMP_PARA} $< ${INCS}
.c.o :
${GCC} ${COMP_PARA} $< ${INCS}
clean :
@-rm -f *.o *.so.* *.so $(TARGET)
@-cd ../bin;rm $(TARGET)
depend:
gcc -E -c $(CFLAGS) $(INCS) -MM *.c >.depend
g++ -E -c $(CPPFLAGS) $(INCS) -MM *.cpp >>.depend
include .depend