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