Add a 'help' target; replace example path with $HOME
authorSebastian <basti@sraa.de>
Tue, 20 Aug 2013 14:04:58 +0000 (16:04 +0200)
committerSebastian <basti@sraa.de>
Tue, 20 Aug 2013 14:04:58 +0000 (16:04 +0200)
dol_example1/Makefile

index b97cf9c2708aa94be6859895b2f6fd7bbaa16257..a2e8a2306dafb32c362725ffe3783b9db77c9890 100644 (file)
@@ -1,18 +1,14 @@
 # Makefile to generate a DOL program
 
-# Target List:
-#      all     -- generate the main executable [default]
-#      run     -- run the main executable
-#      systemc -- generate SystemC code and Makefile.new
-#      dotty   -- show flattened process network
-#      clean   -- clean all generated files
+# Type 'make help' to get a list of targets.
 
+# program to generate
 PROGRAM = example1
 
 # change according to your system
-DOLPATH     = /home/basti/dol/bin
-SYSTEMC_INC = /home/basti/systemc/include
-SYSTEMC_LIB = /home/basti/systemc/lib-linux64/libsystemc.a
+DOLPATH     = $(HOME)/dol/bin
+SYSTEMC_INC = $(HOME)/systemc/include
+SYSTEMC_LIB = $(HOME)/systemc/lib-linux64/libsystemc.a
 
 # list of programs
 JAVA   ?= java
@@ -27,10 +23,19 @@ RM  ?= rm
 # ===========================================================================
 
 CLASSPATH = $(DOLPATH)/dol.jar:$(DOLPATH)/jdom.jar:$(DOLPATH)/xercesImpl.jar
-.PHONY : all run systemc dotty clean 
+.PHONY : all help run systemc dotty clean 
 
 all: $(PROGRAM)
 
+help:
+       @$(ECHO) "Target List:\n" \
+               "\thelp    -- show this help\n" \
+               "\tall     -- generate '$(PROGRAM)' [default]\n" \
+               "\trun     -- generate and run '$(PROGRAM)'\n" \
+               "\tsystemc -- generate SystemC code, but do not compile\n" \
+               "\tdotty   -- show flattened process network using DOTTY\n" \
+               "\tclean   -- clean generated files\n"
+                
 systemc: systemc/src/Makefile.new
 
 run: $(PROGRAM)