2 # uCsim z80.src/Makefile
4 # (c) Drotos Daniel, Talker Bt. 1997
18 DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
19 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
20 -I$(PRJDIR)/cmd.src -I$(PRJDIR)/sim.src
21 CFLAGS = @CFLAGS@ -Wall
22 CXXFLAGS = @CXXFLAGS@ -Wall
25 LIBS = @LIBS@ -L$(PRJDIR) -lsim -lcmd -lutil
28 exec_prefix = @exec_prefix@
32 includedir = @includedir@
34 man1dir = $(mandir)/man1
35 man2dir = $(mandir)/man2
39 OBJECTS = sz80.o glob.o \
44 #TEST_OBJ = test_bit.hex test_dis.hex test_mov.hex test_jmp.hex \
48 # Compiling entire program or any subproject
49 # ------------------------------------------
50 all: checkconf otherlibs z80.src tests
55 # Compiling and installing everything and runing test
56 # ---------------------------------------------------
57 install: all installdirs
58 $(INSTALL) -s sz80 $(bindir)
61 # Deleting all the installed files
62 # --------------------------------
67 # Performing self-test
68 # --------------------
72 # Performing installation test
73 # ----------------------------
77 # Creating installation directories
78 # ---------------------------------
80 test -d $(bindir) || $(INSTALL) -d $(bindir)
83 # Creating dependencies
84 # ---------------------
87 Makefile.dep: *.cc *.h
88 $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
99 sz80: $(OBJECTS) $(PRJDIR)/*.a
100 $(CXX) $(CXXFLAGS) -o sz80 $(OBJECTS) $(LIBS)
103 cd $(PRJDIR)/cmd.src && $(MAKE) all
104 cd $(PRJDIR)/sim.src && $(MAKE) all
107 $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
110 $(Z80ASM) -l $< -o $@ -e $<.lst
113 # Remaking configuration
114 # ----------------------
116 @if [ -f $(PRJDIR)/devel ]; then\
117 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
120 # End of z80.src/Makefile.in