[Sumover-dev] [svn commit] r4306 - vic/branches/cc/cc/test
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Mon Nov 10 18:09:21 GMT 2008
Author: soohyunc
Date: Mon Nov 10 18:09:20 2008
New Revision: 4306
Added:
vic/branches/cc/cc/test/Makefile (contents, props changed)
Log:
added Makefile for compilation
Added: vic/branches/cc/cc/test/Makefile
==============================================================================
--- (empty file)
+++ vic/branches/cc/cc/test/Makefile Mon Nov 10 18:09:20 2008
@@ -0,0 +1,34 @@
+# Makefile
+# $Id$
+
+# some definitions
+CC :=gcc
+CPP :=g++
+
+RM := rm -f
+CFLAGS :=-Wall -g
+CPPFLAGS :=-Wall -g
+
+SRCS := $(wildcard *.cpp)
+OBJS := $(SRCS:.cpp=.o)
+APP := cc
+
+.PHONY: clean distclean
+
+# compile source code to generate object files
+.cpp.o:
+ $(CPP) $(CPPFLAGS) -c $< -o $@
+
+# link object files together to form an executable
+$(APP): $(OBJS)
+ $(CPP) $(OBJS) -o $@
+
+# delete object files and temporary files
+clean:
+ @echo "Start cleaning..."
+ $(RM) $(OBJS)
+ $(RM) *.*~
+
+# delete object files, temporary files, and executable file
+distclean: clean
+ $(RM) $(APP)
More information about the Sumover-dev
mailing list