-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (37 loc) · 853 Bytes
/
Makefile
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
ROOT_DIR = $(PWD)
export ROOT_DIR
INC_DIR = $(ROOT_DIR)/src
SRC_DIR = $(ROOT_DIR)/src
BIN_DIR = $(ROOT_DIR)/bin
LIB_DIR = $(ROOT_DIR)/bin
OBJ_DIR = obj
export INC_DIR
export SRC_DIR
export BIN_DIR
export LIB_DIR
export OBJ_DIR
CC = gcc
AS = as
AR = ar
LD = ld
MAKE = gmake
PYTHON = python
export CC
export AS
export AR
export LD
export MAKE
export PYTHON
# order matters here, build libraries first!
TARGETS = rtdisasm rtdisasm_test relf relf_test dummy_target blackjack
.PHONY: $(TARGETS) debug clean
all:
for target in $(TARGETS); do $(MAKE) -C src/$$target; done
debug: CFLAGS += -DDEBUG -g
debug: LDFLAGS += -g
debug: ASFLAGS += -g
debug:
for target in $(TARGETS); do $(MAKE) -C src/$$target debug; done
clean:
for target in $(TARGETS); do $(MAKE) -C src/$$target clean; done
rm -f $(BIN_DIR)/*