diff options
Diffstat (limited to '')
-rw-r--r-- | bruiser/makefile | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/bruiser/makefile b/bruiser/makefile index a5194c0..4a61d66 100644 --- a/bruiser/makefile +++ b/bruiser/makefile @@ -72,8 +72,10 @@ SRCS:=$(wildcard *.cpp) C_SRCS:=$(wildcard *.c) CXX_FLAGS+=$(CXX_EXTRA) EXTRA_LD_FLAGS+=$(shell $(PY_CONF) --ldflags) -lffi -lcapstone -lkeystone -L./lua-5.3.4/src -llua -TBG_OBJLIST_INC=$(patsubst ./luatablegen/%.c, ./luatablegen/%.o, $(wildcard ./luatablegen/*.c)) LD_FLAGS+=$(EXTRA_LD_FLAGS) +TBG_OBJLIST_INC=$(patsubst ./luatablegen/%.c, ./luatablegen/%.o, $(wildcard ./luatablegen/*.c)) +TBG_OBJLIST_DBG_INC=$(patsubst ./luatablegen/%.c, ./luatablegen/%.odbg, $(wildcard ./luatablegen/*.c)) +TBG_OBJLIST_COV_INC=$(patsubst ./luatablegen/%.c, ./luatablegen/%.ocov, $(wildcard ./luatablegen/*.c)) .DEFAULT:all @@ -104,11 +106,17 @@ dependc:.dependc .c.o: $(CC) $(CC_FLAGS) -c $< -o $@ +%.ocov:%.c + $(CC) $(CC_FLAGS) $(COV_CXX) -c $< -o $@ + +%.odbg:%.c + $(CC) $(CC_FLAGS) -g -c $< -o $@ + .cpp.o: $(CXX) $(CXX_FLAGS) -c $< -o $@ -../mutator_aux.o:../mutator_aux.cpp - $(CXX) $(CXX_FLAGS) -c $< -o $@ +#../mutator_aux.o:../mutator_aux.cpp + #$(CXX) $(CXX_FLAGS) -c $< -o $@ linenoise.o: $(CC) $(CC_FLAGS) linenoise/linenoise.c -c -o linenoise.o @@ -123,7 +131,7 @@ linenoise.o: $(MAKE) -C luatablegen $(LIB_LUA): - $(MAKE) -C lua-5.3.4/src linux a + $(MAKE) -C lua-5.3.4/src linux %.odbg:%.cpp $(CXX) $(CXX_FLAGS) -g -c $< -o $@ @@ -131,16 +139,17 @@ $(LIB_LUA): %.ocov:%.cpp $(CXX) $(CXX_FLAGS) $(COV_CXX) -c $< -o $@ -$(TARGET): $(TARGET).o ../mutator_aux.o ../tinyxml2/tinyxml2.o linenoise.o CompletionHints.o mutagen.o ORCmutation.o bruiserffi.o asmrewriter.o bruisercapstone.o ramdump.o ffs.o $(LIB_LUA) $(TBG_OBJLIST_INC) +$(TARGET): $(TARGET).o ../m0/mutator_aux.o ../tinyxml2/tinyxml2.o linenoise.o CompletionHints.o mutagen.o ORCmutation.o bruiserffi.o asmrewriter.o bruisercapstone.o ramdump.o ffs.o $(LIB_LUA) $(TBG_OBJLIST_INC) $(CXX) $^ $(LD_FLAGS) -o $@ -$(TARGET)-static: $(TARGET).o ../mutator_aux.o ../tinyxml2/tinyxml2.o linenoise.o CompletionHints.o mutagen.o ORCmutation.o bruiserffi.o asmrewriter.o bruisercapstone.o ramdump.o ffs.o $(LIB_LUA) $(TBG_OBJLIST_INC) +# currently broken since it needs a static libpython +$(TARGET)-static: $(TARGET).o ../m0/mutator_aux.o ../tinyxml2/tinyxml2.o linenoise.o CompletionHints.o mutagen.o ORCmutation.o bruiserffi.o asmrewriter.o bruisercapstone.o ramdump.o ffs.o $(LIB_LUA) $(TBG_OBJLIST_INC) $(CXX) $^ $(LD_FLAGS) -static -o $@ -$(TARGET)-dbg: $(TARGET).odbg ../mutator_aux.o ../tinyxml2/tinyxml2.o linenoise.o CompletionHints.o mutagen.o ORCmutation.o bruiserffi.o asmrewriter.o bruisercapstone.o ramdump.o ffs.o $(LIB_LUA) $(TBG_OBJLIST_INC) +$(TARGET)-dbg: $(TARGET).odbg ../m0/mutator_aux.odbg ../tinyxml2/tinyxml2.o linenoise.o CompletionHints.odbg mutagen.o ORCmutation.o bruiserffi.odbg asmrewriter.odbg bruisercapstone.odbg ramdump.odbg ffs.odbg $(LIB_LUA) $(TBG_OBJLIST_DBG_INC) $(CXX) $^ $(LD_FLAGS) -g -o $@ -$(TARGET)-cov: $(TARGET).ocov ../mutator_aux.o ../tinyxml2/tinyxml2.o linenoise.o CompletionHints.o mutagen.o ORCmutation.o bruiserffi.o asmrewriter.o bruisercapstone.o ramdump.o ffs.o $(LIB_LUA) $(TBG_OBJLIST_INC) +$(TARGET)-cov: $(TARGET).ocov ../m0/mutator_aux.ocov ../tinyxml2/tinyxml2.o linenoise.o CompletionHints.ocov mutagen.o ORCmutation.o bruiserffi.ocov asmrewriter.ocov bruisercapstone.ocov ramdump.ocov ffs.ocov $(LIB_LUA) $(TBG_OBJLIST_COV_INC) $(CXX) $^ $(LD_FLAGS) $(COV_LD) -o $@ cov: @@ -168,10 +177,10 @@ tags:$(SRCS) %.dis: %.o objdump -r -d -M intel -S $< > $@ -$(TARGET).so: $(TARGET).o ../mutator_aux.o ../tinyxml2/tinyxml2.o linenoise.o CompletionHints.o mutagen.o ORCmutation.o bruiserffi.o asmrewriter.o bruisercapstone.o ramdump.o ffs.o $(LIB_LUA) $(TBG_OBJLIST_INC) +$(TARGET).so: $(TARGET).o ../m0/mutator_aux.o ../tinyxml2/tinyxml2.o linenoise.o CompletionHints.o mutagen.o ORCmutation.o bruiserffi.o asmrewriter.o bruisercapstone.o ramdump.o ffs.o $(LIB_LUA) $(TBG_OBJLIST_INC) $(CXX) $^ $(LD_FLAGS) -shared -o $@ -$(TARGET).a: $(TARGET).o ../mutator_aux.o ../tinyxml2/tinyxml2.o linenoise.o CompletionHints.o mutagen.o ORCmutation.o bruiserffi.o asmrewriter.o bruisercapstone.o ramdump.o ffs.o $(LIB_LUA) $(TBG_OBJLIST_INC) +$(TARGET).a: $(TARGET).o ../m0/mutator_aux.o ../tinyxml2/tinyxml2.o linenoise.o CompletionHints.o mutagen.o ORCmutation.o bruiserffi.o asmrewriter.o bruisercapstone.o ramdump.o ffs.o $(LIB_LUA) $(TBG_OBJLIST_INC) ar rcs $(TARGET).a $(TARGET).o clean: @@ -182,7 +191,6 @@ deepclean: rm -f *.o *.dis *.odbg *.ocov *~ $(TARGET) $(TARGET).so tags $(TARGET)-static $(TARGET)-dbg $(TARGET).a $(TARGET)-cov FILE*.cpp FILE*.hpp rm .depend $(MAKE) -C lua-5.3.4 clean - $(MAKE) -C LuaJIT clean $(MAKE) -C luatablegen clean help: |