-
Notifications
You must be signed in to change notification settings - Fork 103
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (23 loc) · 693 Bytes
/
Makefile
File metadata and controls
32 lines (23 loc) · 693 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
#CXX =
UNAME := $(shell uname -s)
ifeq ($(UNAME), Darwin)
LINKOPTIONS = -Wl,-search_paths_first -Wl,-dead_strip -v
else
LINKOPTIONS = -Wl,--gc-sections -Wl,--strip-all
endif
INCLUDE += -I./include/
COMPILEOPTIONS = -std=c++11 -O3 -fdata-sections -ffunction-sections
WARNINGS = -Wall -Wextra -Werror
MAIN = xml2json.o
OBJECTS = xml2json.gch
EXEC = xml2json
#############################################################
all : ${EXEC}
xml2json.gch : include/xml2json.hpp
${CXX} ${COMPILEOPTIONS} -c $< -o $@
${MAIN} : xml2json.cpp
${CXX} ${COMPILEOPTIONS} $(INCLUDE) -c $< -o $@
${EXEC} : ${MAIN} ${OBJECTS}
${CXX} ${LINKOPTIONS} ${MAIN} -o ${EXEC}
clean :
rm *.gch *.o ${EXEC}