Skip to content
Snippets Groups Projects
Commit 47c7d720 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Some Makefile cleanups.

parent 9ad4ef8a
No related branches found
No related tags found
No related merge requests found
...@@ -2,29 +2,30 @@ SUBDIRS=compiler lib test examples ...@@ -2,29 +2,30 @@ SUBDIRS=compiler lib test examples
export LABCOMM_JAR=$(shell pwd)/compiler/labcomm_compiler.jar export LABCOMM_JAR=$(shell pwd)/compiler/labcomm_compiler.jar
export LABCOMM=java -jar $(LABCOMM_JAR) export LABCOMM=java -jar $(LABCOMM_JAR)
.PHONY: all
all: $(SUBDIRS:%=make-%) all: $(SUBDIRS:%=make-%)
.PHONY: make-% .PHONY: make-%
make-%: make-%:
LD_LIBRARY_PATH=`pwd`/lib/c $(MAKE) -C $* -e LD_LIBRARY_PATH=`pwd`/lib/c $(MAKE) -C $*
.PHONY: test .PHONY: test
test: $(SUBDIRS:%=test-%) test: $(SUBDIRS:%=test-%)
.PHONY: test-% .PHONY: test-%
test-%: test-%:
LD_LIBRARY_PATH=`pwd`/lib/c $(MAKE) -C $* -e test LD_LIBRARY_PATH=`pwd`/lib/c $(MAKE) -C $* test
.PHONY: clean .PHONY: clean
clean: $(SUBDIRS:%=clean-%) clean: $(SUBDIRS:%=clean-%)
.PHONY: clean-% .PHONY: clean-%
clean-%: clean-%:
$(MAKE) -C $* -e clean $(MAKE) -C $* clean
.PHONY: distclean .PHONY: distclean
distclean: clean $(SUBDIRS:%=distclean-%) distclean: clean $(SUBDIRS:%=distclean-%)
.PHONY: distclean-% .PHONY: distclean-%
distclean-%: distclean-%:
$(MAKE) -C $* -e distclean $(MAKE) -C $* distclean
SUBDIRS=c csharp java python
.PHONY: all .PHONY: all
all: all: $(SUBDIRS:%=make-%)
cd c ; make
cd csharp ; make .PHONY: make-%
cd java ; make make-%:
$(MAKE) -C $*
.PHONY: test .PHONY: test
test: test: $(SUBDIRS:%=test-%)
$(MAKE) -C c test
.PHONY: test-%
test-%:
$(MAKE) -C $* test
.PHONY: clean .PHONY: clean
clean: clean: $(SUBDIRS:%=clean-%)
$(MAKE) -C c clean
$(MAKE) -C csharp clean .PHONY: clean-%
$(MAKE) -C java clean clean-%:
$(MAKE) -C python clean $(MAKE) -C $* clean
.PHONY: distclean .PHONY: distclean
distclean: distclean: clean $(SUBDIRS:%=distclean-%)
$(MAKE) -C c distclean
$(MAKE) -C csharp distclean .PHONY: distclean-%
$(MAKE) -C java distclean distclean-%:
$(MAKE) -C python distclean $(MAKE) -C $* distclean
...@@ -10,12 +10,18 @@ MODULES=Constant\ ...@@ -10,12 +10,18 @@ MODULES=Constant\
SampleHandler \ SampleHandler \
SampleType SampleType
.PHONY: all
all: labcomm.dll all: labcomm.dll
labcomm.dll: $(MODULES:%=se/lth/control/labcomm/%.cs) Makefile labcomm.dll: $(MODULES:%=se/lth/control/labcomm/%.cs) Makefile
mcs -out:$@ -target:library $(filter %.cs, $^) mcs -out:$@ -target:library $(filter %.cs, $^)
.PHONY: test
test:
.PHONY: clean
clean: clean:
.PHONY: distclean
distclean: distclean:
rm -f labcomm.dll rm -f labcomm.dll
...@@ -18,6 +18,7 @@ MODULES=Constant \ ...@@ -18,6 +18,7 @@ MODULES=Constant \
Writer \ Writer \
WriterWrapper WriterWrapper
.PHONY: all
all: labcomm.jar labcomm2014.jar labcomm2006.jar all: labcomm.jar labcomm2014.jar labcomm2006.jar
labcomm.jar: gen/JAVAC labcomm.jar: gen/JAVAC
...@@ -45,6 +46,9 @@ gen/JAVAC: $(MODULES:%=se/lth/control/labcomm/%.java) \ ...@@ -45,6 +46,9 @@ gen/JAVAC: $(MODULES:%=se/lth/control/labcomm/%.java) \
touch $@ touch $@
.PHONY: test
test:
.PHONY: clean .PHONY: clean
clean: clean:
rm -rf gen rm -rf gen
......
.PHONY: all
all:
.PHONY: test
test:
.PHONY: clean .PHONY: clean
clean: clean:
find . -name '*.pyc' -exec rm {} \; find . -name '*.pyc' -exec rm {} \;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment