From eaff2fdc42444d856bb61a1ee6331f88c881a583 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Fri, 12 Apr 2019 19:39:22 -0500 Subject: [PATCH] Add Makefile (for use with Golden Gate). --- Makefile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f9cc335 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +CC = occ +CFLAGS = -w-1 -O-1 + +TEST_OBJS = test.a json.a jsonutil.a +TEST_PROG = test + +DISKBROWSER_OBJS = diskbrowser.a +DISKBROWSER_RSRC = diskbrowser.rez +DISKBROWSER_PROG = DiskBrowser + +PROGS = $(TEST_PROG) $(DISKBROWSER_PROG) + +.PHONY: default +default: $(PROGS) + +$(TEST_PROG): $(TEST_OBJS) + $(CC) $(CFLAGS) -o $@ $^ + +$(DISKBROWSER_PROG): $(DISKBROWSER_OBJS) $(DISKBROWSER_RSRC) + $(CC) $(CFLAGS) -o $@ $(DISKBROWSER_OBJS) + occ $(DISKBROWSER_RSRC) -o $@ + iix chtyp -t ldf -a 1 $@ + +.PHONY: clean +clean: + rm -f $(PROGS) *.a *.o *.root *.A *.O *.ROOT + +%.a: %.c *.h + $(CC) $(CFLAGS) -c $< + +%.a: %.asm + $(CC) $(CFLAGS) -c $<