Commit 36ec36fc authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Added rules for proper 'make clean ; make distclean' in examples

Added some extra cleaning in lib/c/Makefile
parent 073a15e1
SUBDIRS=duck_typing dynamic jgrafchart robot simple tcp \
twoway user_types wiki_example
.PHONY: all
all:
echo To be done...
echo More to be done...
$(MAKE) -C twoway all
.PHONY: test
test:
echo More to be done...
cd simple ; sh compile.sh && sh run.sh
$(MAKE) -C twoway test
$(MAKE) -C duck_typing test
$(MAKE) -C twoway test
.PHONY: clean
clean: $(SUBDIRS:%=clean-%)
clean-%:
$(MAKE) -C $* clean
.PHONY: clean distclean
clean distclean:
echo To be done...
$(MAKE) -C twoway clean
$(MAKE) -C duck_typing clean
.PHONY: distclean
distclean: $(SUBDIRS:%=distclean-%)
distclean-%:
$(MAKE) -C $* distclean
all:
clean:
distclean:
......@@ -24,9 +24,11 @@ ${JAVA_PKG}/client/TestClient.class: ${JAVA_PKG}/client/TestClient.java ${JAVA_P
javac -cp ${CLASSPATH} $<
.PHONY: runjavaserver
runjavaserver : ${JAVA_PKG}/server/TestServer.class
java -cp ${CLASSPATH} $(<:.class=)
.PHONY: runjavaclient
runjavaclient : ${JAVA_PKG}/client/TestClient.class
java -cp ${CLASSPATH} $(<:.class=)
......@@ -47,16 +49,23 @@ ${TLCFILE}.c : ${TLCFILE}.lc
all: client testserver ${JAVA_PKG}/server/TestServer.class ${JAVA_PKG}/client/TestClient.class turtleclient
.PHONY: clean runclient runserver runjavaserver runjavaclient turtleclient
.PHONY: clean
clean :
rm ${LCFILE}.c ${LCFILE}.h client testserver turtleclient
rm ${JAVA_PKG}/server/*.class ${JAVA_PKG}/client/*.class ${JAVA_PKG}/gen/*
rm -f ${LCFILE}.c ${LCFILE}.h client testserver turtleclient
rm -f ${JAVA_PKG}/server/*.class ${JAVA_PKG}/client/*.class
rm -f ${JAVA_PKG}/gen/*
.PHONY: distclean
distclean: clean
.PHONY: runclient
runclient : client
LD_LIBRARY_PATH=${LCLIBDIR} ./$< localhost 9999
.PHONY: runserver
runserver : testserver
LD_LIBRARY_PATH=${LCLIBDIR} ./$< 9999
.PHONY: runtclient
runtclient : turtleclient
LD_LIBRARY_PATH=${LCLIBDIR} ./$< localhost 8082
all:
clean:
distclean:
all:
clean:
distclean:
rm -rf gen
......@@ -51,4 +51,8 @@ runclient : ${JAVA_PKG}/client/TestClient.class
java -cp ${CLASSPATH} $(<:.class=)
clean :
rm ${JAVA_PKG}/server/*.class ${JAVA_PKG}/client/*.class ${JAVA_PKG}/gen/*
rm -f ${JAVA_PKG}/server/*.class
rm -f ${JAVA_PKG}/client/*.class
rm -f ${JAVA_PKG}/gen/*
distclean: clean
......@@ -32,8 +32,8 @@ gen/server: server.c
$(CC) -o $@ $(CFLAGS) $^ -lpthread \
-L../../lib/c -llabcomm
.PHONY: clean
clean:
.PHONY: clean distclean
clean distclean:
rm -rf gen
gen/decimating.o: decimating.h
......
all:
clean:
distclean:
all:
clean:
distclean:
......@@ -168,6 +168,7 @@ clean:
$(RM) test/test_labcomm_errors
$(RM) test/testdata/gen/*.[cho]
$(RM) test/gen/*.[cho]
-rmdir test/gen
for x in $(TESTS); do \
$(RM) $(TEST_DIR)/$$x ; \
done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment