wangzhengquan
2020-06-12 21afe7a2024b0158904ebe08a9d3f5f914792484
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Common make definitions, customized for each platform
 
# Definitions required in all program directories to compile and link
# C programs using gcc.
 
CC = g++
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
LDFLAGS=
LDDIR += -L$(ROOT)/common
LDLIBS += $(LDDIR) -lusgcommon $(EXTRALIBS)
INCLUDE += -I. -I./include -I$(ROOT)/include -I$(ROOT)/common/include
CFLAGS += $(INCLUDE)  -g -std=c++11 -Wall -DLINUX -D_GNU_SOURCE $(EXTRA)
RANLIB=echo
AR=ar
AWK=awk
LIBCOMMON=$(ROOT)/common/libusgcommon.a
 
 
# Common temp files to delete from each directory.
TEMPFILES=core core.* *.o temp.* *.out *.a *.so
 
%:    %.c $(LIBCOMMON)
    $(CC) $(CFLAGS) $(filter-out $(LIBCOMMON), $^) -o $@ $(LDFLAGS) $(LDLIBS)