Package: foremost / 1.5.7-8

04-improve-makefile.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
Author: Raúl Benencia <rul@kalgan.cc>
Description: Improve Foremost's Makefile
 Foremost's Makefile does not uses the standards flags CFLAGS, LDFLAGS and
 CPPFLAGS, breaking the compatibility of the flags set by debhelper. This patch
 modifies the Makefile to make it compile Foremost in a more standard way.
--- a/Makefile
+++ b/Makefile
@@ -36,10 +36,8 @@
 CR_GOAL = $(NAME).exe
 WINCC = $(RAW_CC) $(RAW_FLAGS) -D__WIN32
 
-# Generic "how to compile C files"
-CC = $(RAW_CC) $(RAW_FLAGS) -D__UNIX
-.c.o:   
-	$(CC) -c $<
+%.o : %.c
+	$(CC) $(CFLAGS) $(CPPFLAGS) $(RAW_FLAGS) -D__UNIX -c $<
 
 
 # Definitions we'll need later (and that should rarely change)
@@ -115,7 +113,7 @@
 #---------------------------------------------------------------------
 
 foremost: $(OBJ)
-	$(CC) $(OBJ) -o $(NAME) $(LINK_OPT)
+	$(CC) $(OBJ) -o $(NAME) $(LDFLAGS)
 
 
 #---------------------------------------------------------------------