From 3feff4ae44fd74c32158ed5f505e063b154c4d76 Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期四, 16 七月 2020 11:43:34 +0800 Subject: [PATCH] udpate --- Make.defines.linux | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Make.defines.linux b/Make.defines.linux index 8c48553..ef20eaa 100755 --- a/Make.defines.linux +++ b/Make.defines.linux @@ -2,19 +2,32 @@ # 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) -g -std=c++11 -mcx16 -Wall -DLINUX -D_GNU_SOURCE $(EXTRA) +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) + + -- Gitblit v1.8.0