summaryrefslogtreecommitdiff
path: root/package/zip/patches/patch-unix_Makefile
blob: 42a3a439820e32e4572e3929b56d665e70d1857f (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
--- zip30.orig/unix/Makefile	2008-05-07 08:33:56.000000000 +0200
+++ zip30/unix/Makefile	2016-04-07 22:55:11.000000000 +0200
@@ -22,7 +22,7 @@ SHELL = /bin/sh
 LN = ln -s
 
 # (to use the GNU compiler, change cc to gcc in CC)
-CC = cc
+CC ?= cc
 BIND = $(CC)
 AS = $(CC) -c
 CPP = /lib/cpp
@@ -58,7 +58,7 @@ IZ_OUR_BZIP2_DIR = bzip2
 #   LFLAGS1   flags after output file spec, before obj file list
 #   LFLAGS2   flags after obj file list (libraries, etc)
 CFLAGS_NOOPT = -I. -DUNIX $(LOCAL_ZIP)
-CFLAGS = -O2 $(CFLAGS_NOOPT)
+CFLAGS ?= -O2 $(CFLAGS_NOOPT)
 LFLAGS1 =
 LFLAGS2 = -s
 
@@ -202,7 +202,7 @@ generic: flags
 	eval $(MAKE) $(MAKEF) zips `cat flags`
 
 generic_gcc:
-	$(MAKE) $(MAKEF) generic CC=gcc CPP="gcc -E"
+	$(MAKE) $(MAKEF) generic CPP="gcc -E" CC="$(CC)"
 
 # AT&T 6300 PLUS (don't know yet how to allocate 64K bytes):
 att6300nodir: