aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2015-04-13 04:59:08 -0400
committerB. Watson <yalhcru@gmail.com>2015-04-13 04:59:08 -0400
commit1abc56ed5dd52af310add7916bf9ff0ef73f2f12 (patch)
treecd9c944a52f0aab06a1643a48067d65395080c5f /Makefile
downloadpokersquares-master.tar.gz
initial commitHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile44
1 files changed, 44 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..bc3e855
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,44 @@
+# Makefile for Poker Squares, public release version.
+
+# Assembler to use. Tested with DASM 2.20.09.
+DASM=dasm
+
+# Define PAL=1 to build PAL version (untested on real hardware)
+PAL=
+
+# Level of verbosity for dasm (0 to 3)
+VERBOSE=1
+
+# shouldn't need to edit or redefine anything below this point.
+PROJ=pokersquares
+INCLUDES=pftitle.inc pokersol.inc vcs.h
+
+ifeq ($(PAL),)
+PALFLAG=
+COMPARE=release
+else
+PALFLAG=-DPAL
+COMPARE=pal
+endif
+
+all: $(PROJ).bin check
+
+$(PROJ).bin: $(PROJ).dasm $(INCLUDES)
+ $(DASM) $(PROJ).dasm $(PALFLAG) \
+ -o$(PROJ).bin -f3 -v$(VERBOSE) -l$(PROJ).list -s$(PROJ).syms
+
+# cmp is silent, add echoes to proclaim our results to all and sundry:
+check: $(PROJ).bin
+ @cmp $(PROJ).bin $(PROJ).$(COMPARE).bin && \
+ ( echo ; echo '**********'; \
+ echo "* OK: $(PROJ).bin and $(PROJ).$(COMPARE).bin are identical" ; \
+ echo '**********' ; echo ) || \
+ ( echo ; echo '!!!!!!!!!!'; \
+ echo "! ERROR: $(PROJ).bin and $(PROJ).$(COMPARE).bin are different" ; \
+ echo '!!!!!!!!!!' ; echo ; exit 1 )
+
+clean:
+ rm -f $(PROJ).bin $(PROJ).syms $(PROJ).list
+
+pal: clean
+ $(MAKE) PAL=1