* configure.in: added missing mcs51 in status output
[fw/sdcc] / sim / ucsim / hc08.src / Makefile.in
1 #
2 # uCsim hc08.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 STRIP           = @STRIP@
16
17 top_builddir    = @top_builddir@
18 top_srcdir      = @top_srcdir@
19
20 DEFS            = $(subs -DHAVE_CONFIG_H,,@DEFS@)
21 CPPFLAGS        = @CPPFLAGS@ -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) \
22                   -I$(top_srcdir)/cmd.src -I$(top_srcdir)/sim.src \
23                   -I$(top_srcdir)/gui.src
24 CFLAGS          = @CFLAGS@ -Wall
25 CXXFLAGS        = @CXXFLAGS@ -Wall
26 M_OR_MM         = @M_OR_MM@
27 PICOPT          = @PICOPT@
28 SHAREDLIB       = @SHAREDLIB@
29
30 EXEEXT          = @EXEEXT@
31
32 LIBS            = -L$(top_builddir) -lsim -lutil -lguiucsim -lcmd -lsim @LIBS@
33 DL              = @DL@
34 dl_ok           = @dl_ok@
35
36 prefix          = @prefix@
37 exec_prefix     = @exec_prefix@
38 bindir          = @bindir@
39 libdir          = @libdir@
40 datadir         = @datadir@
41 datarootdir     = @datarootdir@
42 includedir      = @includedir@
43 mandir          = @mandir@
44 man1dir         = $(mandir)/man1
45 man2dir         = $(mandir)/man2
46 infodir         = @infodir@
47 srcdir          = @srcdir@
48 VPATH           = @srcdir@
49
50 OBJECTS_SHARED  = glob.o \
51                   inst.o \
52                   simhc08.o hc08.o
53 OBJECTS_EXE     = shc08.o
54 OBJECTS         = $(OBJECTS_SHARED) $(OBJECTS_EXE)
55
56 HC08ASM         = 
57
58 enable_dlso     = @enable_dlso@
59 dlso_ok         = @dlso_ok@
60
61 #TEST_OBJ       = test_bit.hex test_dis.hex test_mov.hex test_jmp.hex \
62 #                 test_arith.hex
63
64 # Compiling entire program or any subproject
65 # ------------------------------------------
66 all: checkconf otherlibs hc08.src tests
67
68 tests: $(TEST_OBJ)
69
70
71 # Compiling and installing everything and runing test
72 # ---------------------------------------------------
73 install: all installdirs
74         $(INSTALL) shc08$(EXEEXT) $(DESTDIR)$(bindir)/shc08$(EXEEXT)
75         $(STRIP) $(DESTDIR)$(bindir)/shc08$(EXEEXT)
76
77
78 # Deleting all the installed files
79 # --------------------------------
80 uninstall:
81         rm -f $(DESTDIR)$(bindir)/shc08$(EXEEXT)
82
83
84 # Performing self-test
85 # --------------------
86 check: test
87
88 test:
89
90
91 # Performing installation test
92 # ----------------------------
93 installcheck:
94
95
96 # Creating installation directories
97 # ---------------------------------
98 installdirs:
99         test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir)
100
101
102 # Creating dependencies
103 # ---------------------
104 dep: Makefile.dep
105
106 Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h
107         $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.cc,$^) >Makefile.dep
108
109 include Makefile.dep
110 include $(srcdir)/clean.mk
111
112 # My rules
113 # --------
114 .SUFFIXES: .asm .hex
115
116 hc08.src: shc08$(EXEEXT)  shared_lib
117
118 shc08$(EXEEXT): $(OBJECTS) $(top_builddir)/*.a
119         $(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) $(LIBS)
120
121 ifeq ($(dlso_ok),yes)
122 shared_lib: $(top_builddir)/shc08.so
123 else
124 shared_lib:
125         @$(top_srcdir)/mkecho $(top_builddir) "No hc08 shared lib made."
126         @$(top_srcdir)/mkecho $(top_builddir) "(SHAREDLIB="$(SHAREDLIB)",dl_ok="$(dl_ok)",enable_dlso="$(enable_dlso)")"
127 endif
128
129 $(top_builddir)/shc08.so: $(OBJECTS_SHARED)
130         $(CXX) -shared $(OBJECTS_SHARED) -o $(top_builddir)/shc08.so
131
132 otherlibs:
133         $(MAKE) -C $(top_builddir)/cmd.src all
134         $(MAKE) -C $(top_builddir)/sim.src all
135
136 .cc.o:
137         $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
138
139 .asm.hex:
140         $(HC08ASM) -l $< -o $@ -e $<.lst
141
142
143 # Remaking configuration
144 # ----------------------
145 checkconf:
146         @if [ -f $(top_builddir)/devel ]; then\
147           $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
148         fi
149
150 # End of hc08.src/Makefile.in