# Makefile for Draw! for Linux
# Written by Daniel Brodzik
# This program is under the GNU General Public License, version 2 or later.
# For the full copyright notice, see draw.bas.

# This Makefile requires GNU make. The targets (the thingies you type after
# "make") are as follows:

# Builds the program. Typing "make" without any parameters will use this
# target.
all: clean
	fbc draw.bas

# This marks the "clean" and "junkclean" targets as "phony", which means it
# will still work even if a file called "clean" already exists.
.PHONY: clean junkclean

# Removes the executable, any backup, object, and assembly files, and any files
# named "clean" in case some geeky smartaleck actually creates a file named
# "clean" in order to thwart this target. :)
clean:
	rm -f draw *~ *.o *.asm junkclean clean

# This removes any junk files without deleting the executable. It also removes
# files named "clean" in case some geeky smartaleck actually creates a file
# named "clean" in order to thwart this target. :)
junkclean:
	rm -f *~ *.o *.asm junkclean clean


install:
	install -m 755 draw /usr/local/bin

uninstall:
	rm -f /usr/local/bin/draw

keepasm: clean
	fbc -r draw.bas

dist: all junkclean
