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