Package: unace / 1.2b-12

001_cpp_define.patch Patch series | 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
 unix/makefile |   19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

--- a/unix/makefile
+++ b/unix/makefile
@@ -10,26 +10,28 @@
 OBJ = globals.o uac_comm.o uac_crc.o uac_crt.o uac_dcpr.o uac_sys.o unace.o
 SRC = globals.c uac_comm.c uac_crc.c uac_crt.c uac_dcpr.c uac_sys.c unace.c
 
-#CFLAGS = -dNOSTRICMP         #for UNIX compilers not supporting stricmp()
-#CFLAGS = -dHI_LO_BYTE_ORDER  #select correct byte order for your machine!!
+#CFLAGS = -DNOSTRICMP         #for UNIX compilers not supporting stricmp()
+#CFLAGS = -DHI_LO_BYTE_ORDER  #select correct byte order for your machine!!
 
 #CFLAGS = -Wall -O3 -s #-DNDEBUG
 #CFLAGS = -g -Wall -DMDEBUG
 #CFLAGS = -O3 -fno-strength-reduce -fomit-frame-pointer # These are for Linux
-CFLAGS = -O -g -Wall -dLO_HI_BYTE_ORDER
+CFLAGS = -O -g -Wall
 CHALLOC = challoc.o
 CHALLOC =
 CHNEW = chnew.o challoc.o
 CC = gcc
 
+OSTYPE = $(shell uname -s)
+
 ifeq ($(OSTYPE), Linux)
-CFLAGS += -DUNIX -DCASEINSENSE
+CPPFLAGS += -DUNIX -DCASEINSENSE
 else
 ifeq ($(OSTYPE), DOS)
 EXEEXT = .exe
-CFLAGS += -DDOS
+CPPFLAGS += -DDOS
 else
-CFLAGS += -DUNIX -DCASEINSENSE
+CPPFLAGS += -DUNIX -DCASEINSENSE
 endif
 endif
 
@@ -37,15 +39,14 @@ endif
 #LIBS = -lm
 
 
-unace$(EXEEXT): $(OBJ) $(CHALLOC)
-	gcc $(CFLAGS) -o $@ $^ $(LIBS)
+unace$(EXEEXT): $(OBJ) $(CHALLOC) $(LIBS)
 
 clean:
 	rm -f *.o a.out core unace unace.exe
 
 dep:
 	chmod a+rx ./gccmaked
-	./gccmaked -- $(CFLAGS) -- *.c*
+	./gccmaked -- $(CPPFLAGS) -- *.c*
 	rm -f ?akefile.bak
 
 # DO NOT DELETE