summaryrefslogtreecommitdiff
blob: acdc757ef61da359212b13c09424b4e99ccc85a0 (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
--- Makefile.orig	2013-11-21 11:53:21.835712927 +0400
+++ Makefile	2013-11-21 11:53:42.557713372 +0400
@@ -16,19 +16,19 @@
 # General variables
 PACKAGE	    = crunch
 VERSION	    = 3.4
-PREFIX	    = /usr
+PREFIX	    ?= /usr
 DISTDIR	    = $(PACKAGE)-$(VERSION)
 DISTFILES   = crunch.c crunch.1 charset.lst
 BINDIR	    = $(PREFIX)/bin
 BTBINDIR    = /pentest/passwords/$(PACKAGE)
 MANDIR	    = $(PREFIX)/share/man/man1
 INSTALL	    = $(shell which install)
-CC	    = $(shell which gcc)
+CC	    ?= $(shell which gcc)
 LIBFLAGS    = -lm
 THREADFLAGS = -pthread
 OPTFLAGS    = -g -o0
 LINTFLAGS   = -Wall -pedantic
-CFLAGS	    = $(THREADFLAGS) $(LINTFLAGS) -std=c99
+CFLAGS	    += $(THREADFLAGS) $(LINTFLAGS) -std=c99
 VCFLAGS	    = $(THREADFLAGS) $(LINTFLAGS) -std=c99 $(OPTFLAGS)
 LFS	    = $(shell getconf POSIX_V6_ILP32_OFFBIG_CFLAGS)
 INSTALL_OPTIONS	= -o root -g root
@@ -46,7 +46,7 @@
 
 crunch: crunch.c
 	@echo "Building binary..."
-	$(CC) $(CFLAGS) $(LFS) $? $(LIBFLAGS) -o $@
+	$(CC) $(CFLAGS) $(LDFLAGS) $(LFS) $? $(LIBFLAGS) -o $@
 	@echo ""
 
 # Clean target