# 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
# ===========================================================================
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)