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