wangzhengquan
2020-07-23 b6043642f60ef23a7a100418cd4fec1251a98ad9
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
# Common make definitions, customized for each platform
 
# Definitions required in all program directories to compile and link
# C programs using gcc.
DEBUG=y
CC = g++
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
LDFLAGS=
LDDIR += -L$(ROOT)/lib
LDLIBS += $(LDDIR) $(EXTRALIBS)
INCLUDE += -I. -I./include -I$(ROOT)/include -I$(ROOT)/include/usgcommon
 
ifeq ($(DEBUG),y)
  DEBFLAGS = -O -g # "-O" is needed to expand inlines
else
  DEBFLAGS = -O2
endif
 
CFLAGS += $(INCLUDE)  $(DEBFLAGS) -mcx16 -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 
    $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LDLIBS)