summaryrefslogtreecommitdiffstats
path: root/code/templates/Makefile_cpp
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2011-06-26 14:50:51 -0400
committerbnewbold <bnewbold@robocracy.org>2011-06-26 14:50:51 -0400
commitaeb73eaf4b377a55b5850b051a906d26f1bc8b43 (patch)
treed23e251df04dda93e2340a86814901ba071ef7c4 /code/templates/Makefile_cpp
parentee59c4c14866b4dc555a530b9c557a481f56c02c (diff)
downloadopenwrt-repro-aeb73eaf4b377a55b5850b051a906d26f1bc8b43.tar.gz
openwrt-repro-aeb73eaf4b377a55b5850b051a906d26f1bc8b43.zip
new templates
Diffstat (limited to 'code/templates/Makefile_cpp')
-rw-r--r--code/templates/Makefile_cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/code/templates/Makefile_cpp b/code/templates/Makefile_cpp
new file mode 100644
index 0000000..2edcbbf
--- /dev/null
+++ b/code/templates/Makefile_cpp
@@ -0,0 +1,28 @@
+# C++ template Makefile for small projects with gmake
+#
+# Chose a program name (PROGRAM) and add all the .cpp files (not .h) to #
+# CXX_SRCS. Run `make depends` and paste # the output of that command at the
+# bottom and then run `make` to generate an executable.
+#
+# From http://homepages.gac.edu/~mc38/2001J/documentation/gmake.html
+PROGRAM = rename_me
+LOADLIBES =
+CXX_SRCS = main.cpp
+CXX = g++
+CXXFLAGS = -g -Wall -fno-builtins
+CC = gcc
+LDFLAGS = -g
+OBJS = $(CXX_SRCS:.cpp=.o)
+
+$(PROGRAM) : $(OBJS)
+ $(CXX) $(LDFLAGS) $(OBJS) $(LOADLIBES) -o $(PROGRAM)
+
+clean:
+ /bin/rm -qf *.o $(PROGRAM) *~
+
+depend:
+ $(CXX) -MM $(CXX_SRCS)
+
+###
+# <DEPENDENCIES ON .h FILES GO HERE>
+