aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOskari Timperi <oskari.timperi@iki.fi>2011-06-01 11:44:49 +0300
committerOskari Timperi <oskari.timperi@iki.fi>2011-06-01 11:44:49 +0300
commit628bab5c6a24346c22ab039eb2df19ad461ba726 (patch)
tree66d8ae4722e76bfb1cc5d953a585e698e5086662
parent282f3e36efb9b95e91d2c56568ad8019bcde6e3f (diff)
downloadsxml-nodes.tar.gz
sxml-nodes.zip
Add a Makefile to compile and link the examplenodes
-rw-r--r--Makefile38
1 files changed, 38 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..3f1aeb3
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,38 @@
+ifdef OS
+ifeq (,$(findstring windows,${OS}))
+ifneq (,$(findstring Windows,${OS}))
+WINDOWS = 1
+endif
+else
+WINDOWS = 1
+endif
+endif
+
+CXX = g++
+LD = g++
+
+ifdef WINDOWS
+RM = del
+else
+RM = rm -f
+endif
+
+CXXFLAGS = -Wall -Wextra -g -O0
+
+SRCS = example.cpp sxml.cpp
+OBJS = $(addsuffix .o,$(basename ${SRCS}))
+
+OUTPUT = example
+
+.PHONY: clean
+
+all: ${OUTPUT}
+
+clean:
+ ${RM} ${OBJS} ${OUTPUT}
+
+${OUTPUT}: ${OBJS}
+ ${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS}
+
+%.o: %.cpp
+ ${CXX} -c ${CXXFLAGS} ${INCS} $< -o $@