* sim/ucsim/gui.src/serio.src/Makefile.in, sim/ucsim/s51.src/Makefile.in, sim/ucsim...
[fw/sdcc] / sim / ucsim / xa.src / Makefile.in
1 #
2 # uCsim xa.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 STRIP           = @STRIP@
16
17 PRJDIR          = ..
18
19 EXEEXT          = @EXEEXT@
20
21 DEFS            = $(subs -DHAVE_CONFIG_H,,@DEFS@)
22 CPPFLAGS        = @CPPFLAGS@ -I. -I$(PRJDIR) \
23                   -I$(PRJDIR)/cmd.src -I$(PRJDIR)/sim.src -I$(PRJDIR)/gui.src
24 CFLAGS          = @CFLAGS@ -Wall
25 CXXFLAGS        = @CXXFLAGS@ -Wall
26 M_OR_MM         = @M_OR_MM@
27
28 LIBS            = @LIBS@ -L$(PRJDIR) -lsim -lutil -lguiucsim -lcmd -lsim
29
30 prefix          = @prefix@
31 exec_prefix     = @exec_prefix@
32 bindir          = @bindir@
33 libdir          = @libdir@
34 datadir         = @datadir@
35 includedir      = @includedir@
36 mandir          = @mandir@
37 man1dir         = $(mandir)/man1
38 man2dir         = $(mandir)/man2
39 infodir         = @infodir@
40 srcdir          = @srcdir@
41
42 OBJECTS         = sxa.o glob.o \
43                   inst.o \
44                   simxa.o xa.o
45
46 XAASM           = 
47 #TEST_OBJ       = test_bit.hex test_dis.hex test_mov.hex test_jmp.hex \
48 #                 test_arith.hex
49
50
51 # Compiling entire program or any subproject
52 # ------------------------------------------
53 all: checkconf otherlibs xa.src tests
54
55 tests: $(TEST_OBJ)
56
57
58 # Compiling and installing everything and runing test
59 # ---------------------------------------------------
60 install: all installdirs
61         $(INSTALL) sxa$(EXEEXT) $(DESTDIR)$(bindir)/sxa$(EXEEXT)
62         $(STRIP) $(DESTDIR)$(bindir)/sxa$(EXEEXT)
63
64
65 # Deleting all the installed files
66 # --------------------------------
67 uninstall:
68         rm -f $(DESTDIR)$(bindir)/sxa$(EXEEXT)
69
70
71 # Performing self-test
72 # --------------------
73 check:
74
75
76 # Performing installation test
77 # ----------------------------
78 installcheck:
79
80
81 # Creating installation directories
82 # ---------------------------------
83 installdirs:
84         test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir)
85
86
87 # Creating dependencies
88 # ---------------------
89 dep: Makefile.dep
90
91 Makefile.dep: *.cc *.h
92         $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
93
94 include Makefile.dep
95 include clean.mk
96
97 # My rules
98 # --------
99 .SUFFIXES: .asm .hex
100
101 xa.src: sxa$(EXEEXT)
102
103 sxa$(EXEEXT): $(OBJECTS) $(PRJDIR)/*.a
104         $(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) $(LIBS)
105
106 otherlibs:
107         cd $(PRJDIR)/cmd.src && $(MAKE) all
108         cd $(PRJDIR)/sim.src && $(MAKE) all
109
110 .cc.o:
111         $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
112
113 .asm.hex:
114         $(XAASM) -l $< -o $@ -e $<.lst
115
116
117 # Remaking configuration
118 # ----------------------
119 checkconf:
120         @if [ -f $(PRJDIR)/devel ]; then\
121           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
122         fi
123
124 # End of xa.src/Makefile.in