Removing unnecessary output of make process
[fw/sdcc] / sim / ucsim / z80.src / Makefile.in
1 #
2 # uCsim z80.src/Makefile
3 #
4 # (c) Drotos Daniel, Talker Bt. 1997
5 #
6
7 STARTYEAR       = 1997
8
9 SHELL           = /bin/sh
10 CXX             = @CXX@
11 CPP             = @CPP@
12 CXXCPP          = @CXXCPP@
13 RANLIB          = @RANLIB@
14 INSTALL         = @INSTALL@
15
16 PRJDIR          = ..
17
18 DEFS            = $(subs -DHAVE_CONFIG_H,,@DEFS@)
19 CPPFLAGS        = @CPPFLAGS@ -I. -I$(PRJDIR) \
20                   -I$(PRJDIR)/cmd.src -I$(PRJDIR)/sim.src -I$(PRJDIR)/gui.src
21 CFLAGS          = @CFLAGS@ -Wall
22 CXXFLAGS        = @CXXFLAGS@ -Wall
23 M_OR_MM         = @M_OR_MM@
24 PICOPT          = @PICOPT@
25 SHAREDLIB       = @SHAREDLIB@
26
27 LIBS            = @LIBS@ -L$(PRJDIR) -lutil -lsim -lutil -lcmd -lguiucsim
28 DL              = @DL@
29 dl_ok           = @dl_ok@
30
31 prefix          = @prefix@
32 exec_prefix     = @exec_prefix@
33 bindir          = @bindir@
34 libdir          = @libdir@
35 datadir         = @datadir@
36 includedir      = @includedir@
37 mandir          = @mandir@
38 man1dir         = $(mandir)/man1
39 man2dir         = $(mandir)/man2
40 infodir         = @infodir@
41 srcdir          = @srcdir@
42
43 OBJECTS_SHARED  = glob.o \
44                   inst.o \
45                   inst_cb.o \
46                   inst_dd.o \
47                   inst_ed.o \
48                   inst_fd.o \
49                   inst_ddcb.o \
50                   inst_fdcb.o \
51                   simz80.o z80.o
52 OBJECTS_EXE     = sz80.o
53 OBJECTS         = $(OBJECTS_SHARED) $(OBJECTS_EXE)
54
55 Z80ASM          = 
56
57 enable_dlso     = @enable_dlso@
58 dlso_ok         = @dlso_ok@
59
60 #TEST_OBJ       = test_bit.hex test_dis.hex test_mov.hex test_jmp.hex \
61 #                 test_arith.hex
62
63 # Compiling entire program or any subproject
64 # ------------------------------------------
65 all: checkconf otherlibs z80.src tests
66
67 tests: $(TEST_OBJ)
68
69
70 # Compiling and installing everything and runing test
71 # ---------------------------------------------------
72 install: all installdirs
73         $(INSTALL) -s sz80 $(bindir)
74
75
76 # Deleting all the installed files
77 # --------------------------------
78 uninstall:
79         rm -f $(bindir)/sz80
80
81
82 # Performing self-test
83 # --------------------
84 check: test
85
86 test:
87
88
89 # Performing installation test
90 # ----------------------------
91 installcheck:
92
93
94 # Creating installation directories
95 # ---------------------------------
96 installdirs:
97         test -d $(bindir) || $(INSTALL) -d $(bindir)
98
99
100 # Creating dependencies
101 # ---------------------
102 dep: Makefile.dep
103
104 Makefile.dep: *.cc *.h
105         $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
106
107 include Makefile.dep
108 include clean.mk
109
110 # My rules
111 # --------
112 .SUFFIXES: .asm .hex
113
114 z80.src: sz80  shared_lib
115
116 sz80: $(OBJECTS) $(PRJDIR)/*.a
117         $(CXX) $(CXXFLAGS) -o sz80 $(OBJECTS) $(LIBS)
118
119 ifeq ($(dlso_ok),yes)
120 shared_lib: $(PRJDIR)/sz80.so
121 else
122 shared_lib:
123         @$(PRJDIR)/mkecho $(PRJDIR) "No z80 shared lib made."
124         @$(PRJDIR)/mkecho $(PRJDIR) "(SHAREDLIB="$(SHAREDLIB)",dl_ok="$(dl_ok)",enable_dlso="$(enable_dlso)")"
125 endif
126
127 $(PRJDIR)/sz80.so: $(OBJECTS_SHARED)
128         $(CXX) -shared $(OBJECTS_SHARED) -o $(PRJDIR)/sz80.so
129
130 otherlibs:
131         cd $(PRJDIR)/cmd.src && $(MAKE) all
132         cd $(PRJDIR)/sim.src && $(MAKE) all
133
134 .cc.o:
135         $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
136
137 .asm.hex:
138         $(Z80ASM) -l $< -o $@ -e $<.lst
139
140
141 # Remaking configuration
142 # ----------------------
143 checkconf:
144         @if [ -f $(PRJDIR)/devel ]; then\
145           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
146         fi
147
148 # End of z80.src/Makefile.in