File: buildflags.patch

package info (click to toggle)
pmars 0.9.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,240 kB
  • sloc: ansic: 12,416; makefile: 49
file content (36 lines) | stat: -rw-r--r-- 1,078 bytes parent folder | download
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
32
33
34
35
36
Description: Pass buildflags to compiler and linker; disable stripping;
 enable verbose build.
Author: Andrius Merkys <merkys@debian.org>
--- a/src/Makefile
+++ b/src/Makefile
@@ -17,8 +17,8 @@
 # (7)   -DPERMUTATE                         enables -P switch
 # (9)   -DRWLIMIT                           enables read/write limits
 
-CFLAGS = -O -DEXT94 -DXWINGRAPHX -DPERMUTATE -DRWLIMIT 
-LFLAGS = -x
+CFLAGS += -O -DEXT94 -DXWINGRAPHX -DPERMUTATE -DRWLIMIT 
+LFLAGS += -x
 # LIB = -lcurses -ltermlib		# enable this one for curses display
 # LIB = -lvgagl -lvga			# enable this one for Linux/SVGA
 LIB = -L/usr/X11R6/lib -lX11		# enable this one for X11
@@ -38,8 +38,8 @@
 
 $(MAINFILE): $(OBJ1) $(OBJ2) $(OBJ3)
 	@echo Linking $(MAINFILE)
-	@$(CC) -o $(MAINFILE) $(OBJ1) $(OBJ2) $(OBJ3) $(LIB)
-	@strip $(MAINFILE)
+	@$(CC) $(LDFLAGS) -o $(MAINFILE) $(OBJ1) $(OBJ2) $(OBJ3) $(LIB)
+	# @strip $(MAINFILE)
 	@echo done
 
 token.o asm.o disasm.o: asm.h
@@ -56,7 +56,7 @@
 
 .c.o:
 	@echo Compiling $*.o 
-	@$(CC) $(CFLAGS) -c $*.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c
 
 
 clean: