aboutsummaryrefslogtreecommitdiffstats
path: root/makefile
blob: 30e15b8521990d27f4af3c082f80c8de3a7841dc (plain) (blame)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
include macros.mk

TARGET0=mutator-lvl0
TARGET1=mutator-lvl1
TARGET2=mutator-lvl2
TARGETC=mutatorclient
TARGETD=mutatord
TARGETS=mutatorserver
SFCPP01=safercpp-arr
BRUISER=bruiser
OBSC=obfuscator
CGREP=cgrep

.DEFAULT: all

.PHONY:all clean install help $(BRUISER) $(OBSC) $(TARGETC) $(TARGETD) $(TARGETS) $(SFCPP01) $(CGREP)

all: $(TARGET0) $(TARGETC) $(TARGETD) $(TARGETS) $(SFCPP01) $(BRUISER) $(OBSC) $(CGREP)

$(TARGET1):
	$(CXX) $^ $(LD_FLAGS) -o $@

$(TARGET2):
	$(CXX) $^ $(LD_FLAGS) -o $@

$(TARGET0):
	$(MAKE) -C m0 CXX=$(CXX) LLVM_CONF=$(LLVM_CONF) BUILD_MODE=$(BUILD_MODE)

$(SFCPP01):
	$(MAKE) -C safercpp CXX=$(CXX) LLVM_CONF=$(LLVM_CONF) BUILD_MODE=$(BUILD_MODE)

$(BRUISER):
	$(MAKE) -C bruiser CXX=$(CXX) LLVM_CONF=$(LLVM_CONF) BUILD_MODE=$(BUILD_MODE)

$(OBSC):
	$(MAKE) -C obfuscator CXX=$(CXX) LLVM_CONF=$(LLVM_CONF) BUILD_MODE=$(BUILD_MODE)

$(CGREP):
	$(MAKE) -C cgrep CXX=$(CXX) LLVM_CONF=$(LLVM_CONF) BUILD_MODE=$(BUILD_MODE)

$(TARGETC):
	$(MAKE) -C daemon mutatorclient

$(TARGETD):
	$(MAKE) -C daemon mutatord

$(TARGETS):
	$(MAKE) -C daemon mutatorserver

clean:
	$(MAKE) -C tinyxml2 clean
	$(MAKE) -C json clean
	$(MAKE) -C daemon clean
	$(MAKE) -C safercpp clean
	$(MAKE) -C bruiser clean
	$(MAKE) -C obfuscator clean
	$(MAKE) -C m0 clean
	$(MAKE) -C cgrep clean

deepclean: clean
	$(MAKE) -C bruiser deepclean
	$(MAKE) -C m0 deepclean
	$(MAKE) -C obfuscator deepclean
	$(MAKE) -C cgrep deepclean

install:
	chmod +x ./mutator.sh
	chmod +x ./extra-tools/ReportPrintPretty.sh
	chmod +x ./extra-tools/precommitTests.sh
	chmod +x ./extra-tools/oracle.sh
	if [[ ! -d "./temp" ]]; then mkdir temp; fi
	if [[ ! -d "./reliquary" ]]; then mkdir reliquary; fi
	if [[ ! -d "./reliquary/m0" ]]; then mkdir ./reliquary/m0; fi
	if [[ ! -d "./reliquary/bruiser" ]]; then mkdir ./reliquary/bruiser; fi
	if [[ ! -d "./reliquary/safercpp" ]]; then mkdir ./reliquary/safercpp; fi
	if [[ ! -d "./reliquary/obfuscator" ]]; then mkdir ./reliquary/obfuscator; fi
	$(shell echo MUTATOR_HOME=$$(pwd) > ./daemon/mutator.config)

help:
	@echo "Under Construction"