diff options
author | bloodstalker <thabogre@gmail.com> | 2018-02-01 21:12:56 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2018-02-01 21:12:56 +0000 |
commit | 1062f2a106a0215596c62140e650a83252996a2f (patch) | |
tree | 5070bed95027dedd26ebba6af815790bbf9ca006 | |
parent | travis fix (diff) | |
download | mutator-1062f2a106a0215596c62140e650a83252996a2f.tar.gz mutator-1062f2a106a0215596c62140e650a83252996a2f.zip |
makefile update or they kinda do what they were supposed to do
-rw-r--r-- | bruiser/makefile | 24 | ||||
-rw-r--r-- | daemon/makefile | 12 | ||||
-rw-r--r-- | makefile | 12 | ||||
-rw-r--r-- | obfuscator/makefile | 12 | ||||
-rw-r--r-- | safercpp/makefile | 10 |
5 files changed, 57 insertions, 13 deletions
diff --git a/bruiser/makefile b/bruiser/makefile index c94359a..81d4923 100644 --- a/bruiser/makefile +++ b/bruiser/makefile @@ -1,7 +1,6 @@ ######################################INCLUDES################################# include ../macros.mk - #######################################VARS#################################### CXX_FLAGS+=-I/usr/include CXX_FLAGS+=$(shell $(PY_CONF) --includes) @@ -10,7 +9,8 @@ LUA?=JIT LIB_LUA=./lua-5.3.4/src/liblua.a LIB_LUA_JIT=./LuaJIT/src/libluajit.a HEADER_LIST=bruiser.h bruiser-extra.h CompletionHints.h -SRCS=bruiser.cpp, CompletionHints.cpp, ORCmutation.cpp, mutagen.cpp +SRCS=$(wildcard *.cpp) +C_SRCS=$(wildcard *.c) #for some reason without ld the build fails on ubuntu trusty on travis #EXTRA_LD_FLAGS+=-lpthread -ldl -lutil -lm -Xlinker -lpython3 EXTRA_LD_FLAGS+=$(shell $(PY_CONF) --ldflags) -lffi @@ -21,15 +21,19 @@ EXTRA_LD_FLAGS+=$(shell $(PY_CONF) --ldflags) -lffi all: $(BRUISER) -depend: .bruiser.d +depend:.depend +dependc:.dependc + +.depend:$(SRCS) + $(CXX) -MM $(CXX_FLAGS) $^ > ./.depend -.bruiser.d: $(SRCS) - rm -f ./.bruisr.d - $(CXX) $(CXX_FLAGS) -MMD $^ -MF ./.bruiser.d; +.dependc:$(C_SRCS) + $(CC) -MM $(CC_FLAGS) $^ > ./.dependc --include ./.bruiser.d +-include .depend +-include .dependc -.cpp.o: depend +.cpp.o: $(CXX) $(CXX_FLAGS) -c $< -o $@ .c.o: @@ -51,9 +55,13 @@ $(BRUISER): $(BRUISER).o ../mutator_aux.o ../tinyxml2/tinyxml2.o linenoise.o Com clean: rm -f *.o *~ $(BRUISER) + rm .depend + rm .dependc deepclean: rm -f *.o *~ $(BRUISER) + rm .depend + rm .dependc $(MAKE) -C lua-5.3.4 clean $(MAKE) -C LuaJIT clean diff --git a/daemon/makefile b/daemon/makefile index 351f8b7..2fac344 100644 --- a/daemon/makefile +++ b/daemon/makefile @@ -6,13 +6,22 @@ LD_FLAGS= TARGETD=mutatord TARGETS=mutatorserver TARGETC=mutatorclient +SRCS=$(wildcard *.c) ##################################RULES################################ .DEFAULT:all -.PHONY:all clean help +.PHONY:all clean help depend all:$(TARGETC) $(TARGETS) $(TARGETD) +depend:.depend + +.depend:$(SRCS) + rm -f ./.depend + $(CC) -MM $(CC_FLAGS) $^ > ./.depend + +-include .depend + .c.o: $(CC) $(CC_FLAGS) -c $< -o $@ @@ -27,6 +36,7 @@ $(TARGETD): $(TARGETD).o daemon_aux.o clean: rm -f *.o *~ $(TARGETD) $(TARGETS) $(TARGETC) + rm ./.depend help: @echo 'all builds the daemon, the server and the client. all is the default.' @@ -1,7 +1,6 @@ ######################################INCLUDES################################# include macros.mk - #######################################VARS#################################### EXTRA_LD_FLAGS+=tinyxml2/tinyxml2.o @@ -15,7 +14,7 @@ TARGETS=mutatorserver SFCPP01=safercpp-arr BRUISER=bruiser OBSC=obfuscator - +SRCS=$(wildcard *.cpp) ######################################RULES#################################### .DEFAULT: all @@ -23,6 +22,14 @@ OBSC=obfuscator all: $(TARGET0) $(TARGET1) $(TARGET2) $(TARGETC) $(TARGETD) $(TARGETS) $(SFCPP01) $(BRUISER) $(OBSC) +depend:.depend + +.depend:$(SRCS) + rm -f ./.depend + $(CXX) -MM $(CXX_FLAGS) $^ > ./.depend + +-include ./.depend + .cpp.o: $(CXX) $(CXX_FLAGS) -c $< -o $@ $(MAKE) -C tinyxml2 CXX=$(CXX) LLVM_CONF=$(LLVM_CONF) BUILD_MODE=$(BUILD_MODE) @@ -60,6 +67,7 @@ TAGS: $(SRCS) clean: rm -f *.o *~ $(TARGET0) $(TARGET1) $(TARGET2) + rm ./.depend $(MAKE) -C tinyxml2 clean $(MAKE) -C json clean $(MAKE) -C daemon clean diff --git a/obfuscator/makefile b/obfuscator/makefile index ccfc405..11a3219 100644 --- a/obfuscator/makefile +++ b/obfuscator/makefile @@ -4,13 +4,22 @@ include ../macros.mk #######################################VARS#################################### OBSC=obfuscator +SRCS=$(wildcard *.cpp) ######################################RULES#################################### .DEFAULT: all -.PHONY: all clean help +.PHONY: all clean help depend all: $(OBSC) +depend: .depend + +.depend:$(SRCS) + rm -f ./.depend + $(CXX) -MM $(CXX_FLAGS) $^ > ./.depend + +-include ./.depend + .cpp.o: $(CXX) $(CXX_FLAGS) -c $< -o $@ @@ -19,6 +28,7 @@ $(OBSC): $(OBSC).o ../mutator_aux.o clean: rm -f *.o *~ $(OBSC) + rm ./.depend help: @echo 'There is help.' diff --git a/safercpp/makefile b/safercpp/makefile index 5c5791f..57ef94d 100644 --- a/safercpp/makefile +++ b/safercpp/makefile @@ -5,7 +5,7 @@ include ../macros.mk #######################################VARS#################################### CXX_FLAGS+=-frtti SFCPP01=safercpp-arr - +SRCS=$(wildcard *.cpp) ifeq ($(shell $(LLVM_CONF) --has-rtti), NO) $(error your llvm-config says you dont have rtti. you cant build safercpparr without rtti support.) endif @@ -16,6 +16,13 @@ endif all: $(SFCPP01) +%cpp:.depend + +.depend:$(SRCS) + $(CXX) -MM $(CXX_FLAGS) $^ > ./.depend + +-include .depend + .cpp.o: $(CXX) $(CXX_FLAGS) -c $< -o $@ @@ -24,6 +31,7 @@ $(SFCPP01): $(SFCPP01).o ../mutator_aux.o clean: rm -f *.o *~ $(SFCPP01) + rm ./.depend help: @echo 'There is help.' |