summaryrefslogtreecommitdiff
blob: 7fe240e1e65d81324a2aec9018dd20308cc0d395 (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
--- Makefile.orig	2009-09-05 13:02:10.239693713 +0200
+++ Makefile	2009-09-05 13:07:57.573849637 +0200
@@ -24,13 +24,13 @@
 	samdump2.1 samdump2.h bkhive.c COPYING hive.h list.c\
 	main.c README samdump2.c
 DESTDIR   = 
-PREFIX    = /usr/local/
+PREFIX    ?= /usr/local/
 BINDIR    = $(PREFIX)/bin
 MANDIR    = $(PREFIX)/share/man/man1
 INSTALL   = $(shell which install)
-CC	  = $(shell which gcc)
-CFLAGS    = -Wall 
-LIBS      = -lssl
+CC	  ?= $(shell which gcc)
+CFLAGS    ?= -Wall 
+LIBS      = $(shell pkg-config --libs openssl)
 
 # Default target
 all: build
@@ -39,7 +39,7 @@
 
 samdump2: hive.o list.o bkhive.o samdump2.o main.o 
 	@echo "Building binary..."
-	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 	@echo ""
 
 # Clean target