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