From f1de5570a9b7a98c61509f70259f5625acae674e Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 28 Aug 2006 19:14:59 +0000 Subject: Updates to improve selecting build options --- Makefile | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 975c790..3d861e0 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ # # ------------------------------------------------------------------------- # -# $Id: Makefile,v 1.8 2006-08-28 00:46:51 ianc Exp $ +# $Id: Makefile,v 1.9 2006-08-28 19:14:59 ianc Exp $ # # This CFLAGS assumes that gcc is being used. @@ -27,34 +27,50 @@ # CFLAGS = -g -Wall -Werror -pedantic -ansi -O2 -finline-functions +# Decide on what to build. Options are: +# emma - Simple 'breadboard' computer. +# gemma - Simple 'breadboard' computer with a GUI. +# test - Tests built from source using tpasm. +# +TARGETS = emma +#TARGETS += gemma +TARGETS += tests + # Remove this to disable the disassembler (saving some memory) # CFLAGS += -DENABLE_DISASSEM -# Remove the follwing to disable the use of readline +# Remove the follwing to disable the use of readline in EMMA # CFLAGS += -DENABLE_READLINE LIBS += -lreadline -TARGET = emma - SOURCE = z80.c \ z80_decode.c \ z80_dis.c \ expr.c \ emma.c -OBJECTS = z80.o \ +BASE_O = z80.o \ z80_decode.o \ z80_dis.o \ - expr.o \ - emma.o + expr.o + +EMMA_O = emma.o + +GEMMA_O = gemma.o + +all: $(TARGETS) + +emma: $(BASE_O) $(EMMA_O) + cc -o emma $(BASE_O) $(EMMA_O) $(LIBS) -all: $(TARGET) emucpm.hex zexdoc.hex zexall.hex +gemma: $(BASE_O) $(GEMMA_O) + cc `pkg-config --cflags gtk+-2.0` -o gemma $(GBASE_O) $(GEMMA_O) \ + `pkg-config --libs gtk+-2.0` -$(TARGET): $(OBJECTS) - cc -o $(TARGET) $(OBJECTS) $(LIBS) +tests: emucpm.hex zexdoc.hex zexall.hex emucpm.hex: emucpm.z80 tpasm -P Z80 -o intel emucpm.hex emucpm.z80 @@ -70,7 +86,7 @@ zexall.hex: zexall.z80 rm -f _tmp clean: - rm -f $(TARGET) $(OBJECTS) core $(TARGET).exe *.hex *.lbl + rm -f emma gemma $(BASE_O) $(EMMA_O) $(GEMMA_O) core *.hex *.lbl depend: makedepend -- $(CFLAGS) -- $(SOURCE) @@ -101,4 +117,8 @@ emma.o: /usr/include/string.h /usr/include/strings.h /usr/include/ctype.h emma.o: /usr/include/_ctype.h /usr/include/runetype.h /usr/include/signal.h emma.o: /usr/include/sys/signal.h /usr/include/sys/_sigset.h emma.o: /usr/include/machine/signal.h /usr/include/machine/trap.h -emma.o: /usr/include/stdarg.h z80.h +emma.o: /usr/include/stdarg.h /usr/include/readline/readline.h +emma.o: /usr/include/readline/rlstdc.h /usr/include/readline/rltypedefs.h +emma.o: /usr/include/readline/keymaps.h /usr/include/readline/chardefs.h +emma.o: /usr/include/readline/tilde.h /usr/include/readline/history.h +emma.o: /usr/include/time.h /usr/include/sys/timespec.h z80.h expr.h -- cgit v1.2.3