forked from barrybingo/xld_sign
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (22 loc) · 828 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
RELEASE_DIR=.
DEBUG_DIR=./debug
SRC_DIR=./src
#CC = g++
CC=clang++-3.5
CFLAGS_DEBUG = -m32 -static -O0 -g3 -I/usr/include/c++/4.9
CFLAGS_RELEASE = -m32 -static -O3 -I/usr/include/c++/4.9
CLIBS = -lcrypto
CINC = -I$(SRC_DIR)
CPP_FILES = $(wildcard src/*.cpp)
RELEASE_FILES = $(addprefix $(RELEASE_DIR)/,$(notdir $(CPP_FILES:.cpp=.out)))
DEBUG_FILES = $(addprefix $(DEBUG_DIR)/,$(notdir $(CPP_FILES:.cpp=.out)))
release: $(RELEASE_FILES) Makefile
debug: $(DEBUG_FILES) Makefile
all: debug release
$(RELEASE_DIR)/%.out: $(SRC_DIR)/%.cpp Makefile
$(CC) $(CFLAGS_RELEASE) $(CWARN_ALL) $(CINC) $< -o $(RELEASE_DIR)/$(notdir $@) $(CLIBS)
$(DEBUG_DIR)/%.out: $(SRC_DIR)/%.cpp Makefile
$(CC) $(CFLAGS_DEBUG) $(CWARN_ALL) $(CINC) $< -o $(DEBUG_DIR)/$(notdir $@) $(CLIBS)
clean:
rm $(RELEASE_DIR)/*.out
rm $(DEBUG_DIR)/*.out