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