aboutsummaryrefslogtreecommitdiff
path: root/archivers/unarchiver/files/patch-XADMaster_Makefile.freebsd
blob: b2f911d28c3f245e12ea8db6d55470a96067c3f9 (plain) (blame)
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
60
61
62
63
64
65
66
67
68
--- XADMaster/Makefile.freebsd.orig	2016-05-17 06:39:04 UTC
+++ XADMaster/Makefile.freebsd
@@ -1,10 +1,7 @@
 # Compilers and linkers
 
-OBJCC = clang
-CC = clang
-CXX = clang++
+OBJCC ?= $(CC)
 LD = $(CXX)
-AR = ar
 
 # Options for compilation
 
@@ -16,13 +13,11 @@ GNUSTEP_OPTS =	-DGNUSTEP \
 		-fobjc-exceptions \
 		-fconstant-string-class=NSConstantString
 
-GCC_OPTS = 	-O2 \
-		-Wno-import \
+GCC_OPTS = 	$(CFLAGS) -Wno-import \
 		-Wno-multichar \
-		-g \
 		-D_FILE_OFFSET_BITS=64 \
-		-isystem /usr/local/GNUstep/System/Library/Headers \
-		-I/usr/local/include
+		-isystem $(LOCALBASE)/GNUstep/System/Library/Headers \
+		-I$(LOCALBASE)/include
 
 OBJC_OPTS =	-std=gnu99
 
@@ -42,6 +37,7 @@ LIBS =	-Wl,--no-whole-archive \
 	-lgnustep-base \
 	-lz \
 	-lbz2 \
+	-lwavpack \
 	-licuuc \
 	-lobjc \
 	-lm
@@ -49,8 +45,8 @@ LIBS =	-Wl,--no-whole-archive \
 ALL_LDFLAGS =	-Wl,--whole-archive \
 		-fexceptions \
 		-fgnu-runtime \
-		-L/usr/local/lib \
-		-L/usr/local/GNUstep/System/Library/Libraries \
+		-L$(LOCALBASE)/lib \
+		-L$(LOCALBASE)/GNUstep/System/Library/Libraries \
 		$(LDFLAGS)
 
 # Paths
@@ -74,7 +70,7 @@ libXADMaster.a: $(LIBRARY_OBJS)
 	$(AR) rcs $@ $^
 
 ../UniversalDetector/libUniversalDetector.a:
-	gmake -C ../UniversalDetector -f Makefile.linux
+	$(MAKE) -C ../UniversalDetector -f Makefile.freebsd
 
 XADTest2: $(XADTEST2_OBJS) libXADMaster.a ../UniversalDetector/libUniversalDetector.a
 	$(LD) $(ALL_LDFLAGS) -o $@ $^ $(LIBS)
@@ -99,7 +95,7 @@ lsar: $(LSAR_OBJS) $(CMDLINE_OBJS) libXA
 
 clean:
 	rm -rf $(BUILD_DIR) $(EXECUTABLE_FILES) $(LIBRARY_FILES)
-	gmake -C ../UniversalDetector -f Makefile.linux clean
+	$(MAKE) -C ../UniversalDetector -f Makefile.freebsd clean
 
 .PHONY: ../UniversalDetector/libUniversalDetector.a clean