view Makefile @ 12:c4cd811813ef

Work on Makefile.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 30 Jan 2011 01:12:14 +0200
parents a7751971c2a3
children 562744de803c
line wrap: on
line source

# Settings, directories
RUN=Ristipolku.class
CLASSES=game/Piece.class game/PieceType.class game/Engine.class game/Interpolate.class
TARGETS=$(RUN) $(CLASSES)

# Utils
JAVAC=javac -g
APPLETVIEWER=appletviewer

###
### Targets
###
all: $(TARGETS)


%.class: %.java
	$(JAVAC) $<

game/%.class: game/%.java
	$(JAVAC) $<


Ristipolku.class: game/Piece.class game/PieceType.class game/Engine.class game/Interpolate.class


run: $(RUN)
	$(APPLETVIEWER) $(patsubst %.class,%.html,$<)


###
### Package
###
Ristipolku.jar: $(RUN) $(CLASSES)
	

upload: index.html Ristipolku.jar
	@scp $+ ccr@tnsp.org:public_html/ristipolku/


###
### Cleanup
###
clean:
	$(RM) $(TARGETS) *.class game/*.class


srcclean: clean
	$(RM) *~ game/*~ graphics/*~



# dummy