-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (31 loc) · 813 Bytes
/
Makefile
File metadata and controls
41 lines (31 loc) · 813 Bytes
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
obj ?= ./build
SOURCES = main.c
# Use V=1 for verbose output
ifeq ($(V),)
Q := @
else
Q :=
endif
CFLAGS += -Wall #-Werror
CFLAGS += -I./third_party/unicorn/include/
CFLAGS += -I./third_party/capstone/include/
LDFLAGS += -L./third_party/unicorn -lunicorn
LDFLAGS += -L./third_party/capstone -lcapstone
LDFLAGS += -lelf
OBJS = $(patsubst %.c,$(obj)/%.o,$(SOURCES))
DEPS = $(patsubst %.c,$(obj)/%.d,$(SOURCES))
all: $(obj)/fuzzemu
$(obj):
@echo " MKDIR $(obj)"
$(Q)mkdir -p $(obj)
$(obj)/%.d $(obj)/%.o: %.c | $(obj)
@echo " CC $(notdir $<)"
$(Q)$(CC) $(CFLAGS) -c -MMD -MF $(basename $@).d -o $(basename $@).o $<
$(obj)/fuzzemu: $(OBJS)
@echo " LD $(notdir $@)"
$(Q)$(CC) $< $(LDFLAGS) -o $@
.PHONY: clean
clean:
@echo " RM $(obj)"
$(Q)rm -rf $(obj)
-rm -f elf_symbols_gen.h