#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#

--- squashfs-tools/Makefile~flags	2004-04-30 11:29:35.000000000 -0400
+++ squashfs-tools/Makefile	2004-09-13 00:43:08.922418512 -0400
@@ -1,12 +1,20 @@
+CC = gcc
+CCLD = $(CC)
 INCLUDEDIR = .
-
-CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2
+CFLAGS_R = -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+CFLAGS = -O2
+LDFLAGS_R =
+LDFLAGS =
+LIBS = -lz
 
 mksquashfs: mksquashfs.o read_fs.o sort.o
-	$(CC) mksquashfs.o read_fs.o sort.o -lz -o $@
+	$(CCLD) $(LDFLAGS_R) $(LDFLAGS) mksquashfs.o read_fs.o sort.o $(LIBS) -o $@
 
 mksquashfs.o: mksquashfs.c mksquashfs.h
+	$(CC) $(CFLAGS_R) $(CFLAGS) -c -o mksquashfs.o mksquashfs.c
 
 read_fs.o: read_fs.c read_fs.h
+	$(CC) $(CFLAGS_R) $(CFLAGS) -c -o read_fs.o read_fs.c
 
 sort.o: sort.c
+	$(CC) $(CFLAGS_R) $(CFLAGS) -c -o sort.o sort.c