initial commit for labryinth project on git_hub.
Signed-off-by: philippe lhardy <philippe@pavilionartlogiciel>
This commit is contained in:
48
java/Makefile
Normal file
48
java/Makefile
Normal file
@@ -0,0 +1,48 @@
|
||||
PACKAGE=org.artisanlogiciel.games
|
||||
PACKAGE_DIR=$(subst .,/,$(PACKAGE))
|
||||
OUT=out
|
||||
|
||||
$(OUT):
|
||||
mkdir -p $(OUT)
|
||||
|
||||
clean:
|
||||
find $(OUT) -name "*.class" -type f -print0|xargs -0 rm
|
||||
|
||||
test:
|
||||
javac -d $(OUT) $(PACKAGE_DIR)/LabyModel.java
|
||||
javac -d $(OUT) $(PACKAGE_DIR)/Main.java
|
||||
java -cp $(OUT) $(PACKAGE).Main
|
||||
|
||||
|
||||
run/%: $(OUT)
|
||||
javac -d $(OUT) $(PACKAGE_DIR)/$(subst run/,,$@).java
|
||||
java -cp $(OUT) $(PACKAGE)/$(subst run/,,$@)
|
||||
|
||||
display: run/Display
|
||||
|
||||
|
||||
display/%: $(OUT)
|
||||
javac -d $(OUT) $(PACKAGE_DIR)/Display.java
|
||||
java -cp $(OUT) $(PACKAGE).Display $(subst display/,,$@)
|
||||
|
||||
compile/%:
|
||||
javac -d $(OUT) $(PACKAGE_DIR)/$(subst compile/,,$@).java
|
||||
|
||||
$(PACKAGE_DIR)/%.java:
|
||||
./generate_newclass.sh $(subst .java,,$(subst $(PACKAGE_DIR)/,,$@))
|
||||
|
||||
work/%: $(PACKAGE_DIR)/$(subst work/,,%).java
|
||||
emacs $<
|
||||
|
||||
work: work/LabyModel
|
||||
|
||||
save:
|
||||
git citool
|
||||
|
||||
.PHONY: clean test work display work/% run/% save compile/%
|
||||
|
||||
# tried to avoid intermediate file removal : does not work
|
||||
# .SECONDARY: $(PACKAGE_DIR)/%.java
|
||||
|
||||
# this does work : once precious intermediate file is not removed.
|
||||
.PRECIOUS: $(PACKAGE_DIR)/%.java
|
||||
Reference in New Issue
Block a user