extend global CFLAGS and LDFLAGS to aid distro packaging
[hashcat.git] / src / Makefile
index 4fdcb5b..cf44590 100644 (file)
@@ -90,7 +90,7 @@ VERSION_TAG              := $(shell test -d .git && git describe --tags --dirty=
 ## Compiler flags
 ##
 
-CFLAGS                   := -pipe -W -Wall -std=c99 -Iinclude/ -IOpenCL/ -I$(OPENCL_HEADERS_KHRONOS)/
+CFLAGS                   += -pipe -W -Wall -std=c99 -Iinclude/ -IOpenCL/ -I$(OPENCL_HEADERS_KHRONOS)/
 
 ifndef DEBUG
 CFLAGS                   += -O2
@@ -109,10 +109,10 @@ BINARY_NATIVE            := $(PROG_NAME)
 
 ifeq ($(UNAME),Darwin)
 export MACOSX_DEPLOYMENT_TARGET=10.9
-BINARY_NATIVE            := $(BINARY_NATIVE).app
 CFLAGS_NATIVE            := -D_POSIX -DDARWIN
 CFLAGS_NATIVE            += $(CFLAGS)
 LFLAGS_NATIVE            := -lpthread
+LFLAGS_NATIVE            += $(LDFLAGS)
 endif # darwin
 
 ifeq ($(UNAME),Linux)
@@ -123,6 +123,7 @@ endif
 CFLAGS_NATIVE            += $(CFLAGS)
 LFLAGS_NATIVE            := -lpthread -ldl
 CFLAGS_NATIVE            += -DHAVE_HWMON
+LFLAGS_NATIVE            += $(LDFLAGS)
 endif # linux
 
 ##
@@ -181,7 +182,7 @@ native: hashcat
 binaries: linux32 linux64 win32 win64
 
 clean:
-       $(RM) -f obj/*.o *.bin *.exe *.app *.restore *.out *.pot *.dictstat *.log hashcat core
+       $(RM) -f obj/*.o *.bin *.exe *.restore *.out *.pot *.dictstat *.log hashcat core
        $(RM) -rf *.induct
        $(RM) -rf *.outfiles
        $(RM) -rf *.dSYM