aboutsummaryrefslogtreecommitdiffstats
path: root/community/ripmime/ripmime-1.4.0.10-makefile.patch
blob: 599cb71f7d5a00a6d4bfbe06adea72dd49368625 (plain)
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
--- /tmp/Makefile
+++ ./Makefile
@@ -3,7 +3,7 @@
 #
 # 0.1.13: Added -I.
 
-LOCATION=/usr/local
+LOCATION:=/usr
 VERSION=0.1.14
 # VERSION changes
 #---------------------
@@ -42,22 +42,22 @@
 	./generate-buildcodes.sh
 
 ripOLE/ole.o:
-	./build_ripOLE
+	$(MAKE) -C ripOLE
 
 tnef/tnef.o:
-	./build_tnef
+	$(MAKE) -C tnef
 
 .c.o:
-	${CC} ${CFLAGS} $(COMPONENTS) -c $*.c
+	${CC} ${CFLAGS} -fPIC $(COMPONENTS) -c $*.c
 
 all: ${OBJ} 
 
 
 solib: ${OFILES} ripmime-api.o
-	gcc --shared -Wl,-soname,libripmime.so.1 ${OFILES} ripmime-api.o -o libripmime.so.1.4.0 -lc
+	${CC} ${LDFLAGS} --shared -Wl,-soname,libripmime.so.1 ${OFILES} ripmime-api.o -o libripmime.so.1.4.0 -lc
 
-libripmime: ${OFILES} ripmime-api.o
-	ar ruvs libripmime.a ${OFILES}  ripmime-api.o
+libripmime.a: ${OFILES} ripmime-api.o
+	${AR} ruvs $@ $^
 
 ripl: ripmime.a
 	${CC} ${CFLAGS} ripmime.c ripmime.a -o ripmime
@@ -65,16 +65,18 @@
 sco: ${OFILES}
 	${CC} ${CFLAGS} ripmime.c ${OFILES} -o ripmime -lsocket
 
-ripmime: ${OFILES} ripmime.c buildcodes.h
-	${CC} ${CFLAGS} $(COMPONENTS) ripmime.c ${OFILES} -o ripmime ${LIBS}
+ripmime: ${OFILES} ripmime.o
+	${CC} ${CFLAGS} $(COMPONENTS) $(LDFLAGS) $^ -o $@ ${LIBS}
 
+ripmime.o: buildcodes.h
+
 riptest: ${OFILES}
 	${CC} ${CFLAGS} riptest.c ${OFILES} -o riptest
 
 install: ${OBJ}
 	strip ripmime
-	cp ripmime ${LOCATION}/bin/
-	cp ripmime.1  ${LOCATION}/man/man1
+	install -Dm775 ripmime ${DESTDIR}${LOCATION}/bin/ripmime
+	install -Dm644 ripmime.1 ${DESTDIR}${LOCATION}/share/man/man1/ripmime.1
 
 ffget_test: ffget_mmap_test.c ffget_mmap.[ch] logger.o ffget_mmap.o
 	${CC} ${CFLAGS} ffget_mmap_test.c logger.o ffget_mmap.o -o ffgt