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