Browse code

LD w/debuggin

Jiri Kuthan authored on 07/02/2002 03:37:13
Showing 1 changed files
... ...
@@ -67,9 +67,9 @@ DEFS+= -DNAME='"$(NAME)"' -DVERSION='"$(RELEASE)"' -DARCH='"$(ARCH)"' \
67 67
 #-DNO_DEBUG#-DSTATS -DNO_DEBUG
68 68
 #-DNO_LOG
69 69
 
70
-#PROFILE=  -pg #set this if you want profiling
71
-#mode = debug
72
-mode = release
70
+PROFILE=  -pg #set this if you want profiling
71
+mode = debug
72
+#mode = release
73 73
 
74 74
 # platform dependent settings
75 75
 
... ...
@@ -96,7 +96,7 @@ endif
96 96
 
97 97
 #*FLAGS used for compiling the modules
98 98
 MOD_CFLAGS=-fPIC -DPIC $(CFLAGS)
99
-MOD_LDFLAGS=-O2 -shared
99
+MOD_LDFLAGS=-shared $(LDFLAGS)
100 100
 
101 101
 LEX=flex
102 102
 YACC=bison
... ...
@@ -111,10 +111,15 @@ ifeq ($(ARCH), Linux)
111 111
 
112 112
 endif
113 113
 ifeq  ($(ARCH), SunOS)
114
-
114
+	ifeq ($(mode), release)
115
+		LDFLAGS=-O2 $(PROFILE)
116
+		MOD_LDFLAGS=-O2 -G
117
+	else
118
+		LDFLAGS=-g $(PROFILE)
119
+		MOD_LDFLAGS=-g -G
120
+	endif
121
+	
115 122
 YACC=yacc
116
-LDFLAGS=-O2 $(PROFILE)
117
-MOD_LDFLAGS=-O2 -G
118 123
 LIBS+=-L/usr/local/lib -lxnet # or -lnsl -lsocket or -lglibc ?
119 124
 
120 125
 endif