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