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