version 0.2.39: fix of arith insts and start of re-structure
[fw/sdcc] / sim / ucsim / sim.src / Makefile.in
1 #
2 # S51 sim.src/Makefile
3 #
4 # (c) Drotos Daniel, Talker Bt. 1997,99
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)/gui.src
21 CFLAGS          = @CFLAGS@ -Wall
22 CXXFLAGS        = @CXXFLAGS@ -Wall
23 M_OR_MM         = @M_OR_MM@
24
25 prefix          = @prefix@
26 exec_prefix     = @exec_prefix@
27 bindir          = @bindir@
28 libdir          = @libdir@
29 datadir         = @datadir@
30 includedir      = @includedir@
31 mandir          = @mandir@
32 man1dir         = $(mandir)/man1
33 man2dir         = $(mandir)/man2
34 infodir         = @infodir@
35 srcdir          = @srcdir@
36
37 OBJECTS         = app.o sim.o itsrc.o brk.o option.o arg.o stack.o \
38                   guiobj.o uc.o hw.o mem.o
39
40
41 # Compiling entire program or any subproject
42 # ------------------------------------------
43 all: checkconf sim_lib
44
45 sim.src: all
46
47
48 # Compiling and installing everything and runing test
49 # ---------------------------------------------------
50 install: all installdirs
51
52
53 # Deleting all the installed files
54 # --------------------------------
55 uninstall:
56
57
58 # Performing self-test
59 # --------------------
60 check:
61
62
63 # Performing installation test
64 # ----------------------------
65 installcheck:
66
67
68 # Creating installation directories
69 # ---------------------------------
70 installdirs:
71
72
73 # Creating dependencies
74 # ---------------------
75 dep: main.dep
76
77 Makefile.dep: *.cc *.h
78         $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
79
80 include Makefile.dep
81 include clean.mk
82
83 #parser.cc: parser.y
84
85 #plex.cc: plex.l
86
87 # My rules
88 # --------
89
90 sim_lib: $(PRJDIR)/libsim.a
91
92 $(PRJDIR)/libsim.a: $(OBJECTS)
93         ar -rcu $*.a $(OBJECTS)
94         $(RANLIB) $*.a
95
96 .cc.o:
97         $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
98
99 .y.cc:
100         rm -f $*.cc $*.h
101         $(YACC) -d $<
102         mv y.tab.c $*.cc
103         mv y.tab.h $*.h
104
105 .l.cc:
106         rm -f $*.cc
107         $(LEX) -t $< >$*.cc
108
109
110 # Remaking configuration
111 # ----------------------
112 checkconf:
113         @if [ -f $(PRJDIR)/devel ]; then\
114           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
115         fi
116
117 # End of sim.src/Makefile