wangzhengquan
2020-08-23 3c4b18f39e06a09a05a13476f212d4deaa1e4707
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
# 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)/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=-ansi -mcx16 $(INCLUDE) $(DEBFLAGS)  -std=c++11 -Wall -DMACOS -D_DARWIN_C_SOURCE $(EXTRA)
RANLIB=ranlib
AR=ar
AWK=awk
 
# Common temp files to delete from each directory.
TEMPFILES=core core.*  **/*.o temp.* *.out *.a *.so
 
 
%:    %.c 
    $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LDLIBS)