-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (31 loc) · 941 Bytes
/
Copy pathMakefile
File metadata and controls
42 lines (31 loc) · 941 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
dependdir := $(shell ls .depend >/dev/null 2>&1)
ifneq ($(dependdir), .depend)
dependdir := $(shell touch .depend)
endif
INSTALL_PATH=/home/gdmj_share/
CC=g++
GCC=gcc
COMP_PARA=-g -Wall -c -D__MULITI_THREAD__ -D__DEBUG__ -DNDEBUG -D_LINUX -D_mt
LINK_PARA=-mt #-pg
INCS=-I/usr/local/include -I/usr/include/ -I../interface/
LIBS=-L/usr/local/lib -lpthread -lz
CSRCS = $(wildcard *.c)
CPPSRCS = $(wildcard *.cpp)
COBJS = $(patsubst %.c, %.o, $(CSRCS))
CPPOBJS = $(patsubst %.cpp, %.o, $(CPPSRCS))
OBJS = $(CPPOBJS) $(COBJS)
TARGET=../libs/libby_ctrl.a
all : $(TARGET)
$(TARGET): $(OBJS)
ar -r $(TARGET) *.o
.cpp.o :
${CC} ${COMP_PARA} $< ${INCS}
.c.o :
${GCC} ${COMP_PARA} $< ${INCS}
clean :
@-rm -f *.o *.so.* *.so *.a $(TARGET)
@-rm -f ../libs/*.a
depend:
gcc -E -c $(CFLAGS) $(INCS) -MM *.c >.depend
g++ -E -c $(CPPFLAGS) $(INCS) -MM *.cpp >>.depend
include .depend