view Makefile @ 15:59ff451750fb

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 30 Jan 2011 06:13:45 +0200
parents ae717d7d05ae
children 4507a431b410
line wrap: on
line source

# Settings, directories
RUN=Ristipolku.class

RESOURCES=graphics/board.png

CLASSES=game/Piece.class game/PieceType.class game/Engine.class game/Interpolate.class

# Utils
JAVAC=javac -g
APPLETVIEWER=appletviewer

###
### Targets
###
TARGETS=$(RUN) $(CLASSES)

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) $(RESOURCES)
	jar cvf $@ $+


upload: Ristipolku.jar
	@scp $+ ccr@tnsp.org:public_html/ristipolku/
#	$(RM) $<


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


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

# dummy