瀏覽代碼

LD w/debuggin

Jiri Kuthan 23 年之前
父節點
當前提交
7c0265ccea
共有 1 個文件被更改,包括 12 次插入7 次删除
  1. 12 7
      Makefile.defs

+ 12 - 7
Makefile.defs

@@ -67,9 +67,9 @@ DEFS+= -DNAME='"$(NAME)"' -DVERSION='"$(RELEASE)"' -DARCH='"$(ARCH)"' \
 #-DNO_DEBUG#-DSTATS -DNO_DEBUG
 #-DNO_DEBUG#-DSTATS -DNO_DEBUG
 #-DNO_LOG
 #-DNO_LOG
 
 
-#PROFILE=  -pg #set this if you want profiling
-#mode = debug
-mode = release
+PROFILE=  -pg #set this if you want profiling
+mode = debug
+#mode = release
 
 
 # platform dependent settings
 # platform dependent settings
 
 
@@ -96,7 +96,7 @@ endif
 
 
 #*FLAGS used for compiling the modules
 #*FLAGS used for compiling the modules
 MOD_CFLAGS=-fPIC -DPIC $(CFLAGS)
 MOD_CFLAGS=-fPIC -DPIC $(CFLAGS)
-MOD_LDFLAGS=-O2 -shared
+MOD_LDFLAGS=-shared $(LDFLAGS)
 
 
 LEX=flex
 LEX=flex
 YACC=bison
 YACC=bison
@@ -111,10 +111,15 @@ ifeq ($(ARCH), Linux)
 
 
 endif
 endif
 ifeq  ($(ARCH), SunOS)
 ifeq  ($(ARCH), SunOS)
-
+	ifeq ($(mode), release)
+		LDFLAGS=-O2 $(PROFILE)
+		MOD_LDFLAGS=-O2 -G
+	else
+		LDFLAGS=-g $(PROFILE)
+		MOD_LDFLAGS=-g -G
+	endif
+	
 YACC=yacc
 YACC=yacc
-LDFLAGS=-O2 $(PROFILE)
-MOD_LDFLAGS=-O2 -G
 LIBS+=-L/usr/local/lib -lxnet # or -lnsl -lsocket or -lglibc ?
 LIBS+=-L/usr/local/lib -lxnet # or -lnsl -lsocket or -lglibc ?
 
 
 endif
 endif