Removing unnecessary output of make process
[fw/sdcc] / sim / ucsim / s51.src / Makefile.in
1 #
2 # uCsim s51.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 PRJDIR          = ..
18
19 DEFS            = $(subs -DHAVE_CONFIG_H,,@DEFS@)
20 CPPFLAGS        = @CPPFLAGS@ -I. -I$(PRJDIR) \
21                   -I$(PRJDIR)/cmd.src -I$(PRJDIR)/sim.src -I$(PRJDIR)/gui.src
22 CFLAGS          = @CFLAGS@ -Wall
23 CXXFLAGS        = @CXXFLAGS@ -Wall
24 M_OR_MM         = @M_OR_MM@
25 PICOPT          = @PICOPT@
26 SHAREDLIB       = @SHAREDLIB@
27
28 SDCC            = sdcc
29 SDCFLAGS        = --debug --stack-after-data --model-small
30 SDCPPFLAGS      = 
31
32 LIBS            = @LIBS@ -L$(PRJDIR) -lsim -lutil -lsim -lcmd -lguiucsim
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 includedir      = @includedir@
42 mandir          = @mandir@
43 man1dir         = $(mandir)/man1
44 man2dir         = $(mandir)/man2
45 infodir         = @infodir@
46 srcdir          = @srcdir@
47
48 OBJECTS_SHARED  = glob.o sim51.o \
49                   inc.o jmp.o mov.o logic.o arith.o bit.o \
50                   timer0.o timer1.o timer2.o serial.o port.o interrupt.o \
51                   wdt.o pca.o \
52                   uc51.o uc52.o uc51r.o uc89c51r.o uc251.o \
53                   uc390.o uc390hw.o
54 OBJECTS_EXE     = s51.o 
55 OBJECTS         = $(OBJECTS_SHARED) $(OBJECTS_EXE)
56
57 enable_dlso     = @enable_dlso@
58 dlso_ok         = @dlso_ok@
59
60
61 # Compiling entire program or any subproject
62 # ------------------------------------------
63 all: checkconf otherlibs s51.src
64
65
66 # Compiling and installing everything and runing test
67 # ---------------------------------------------------
68 install: all installdirs
69         if test -f s51.exe; then $(INSTALL) -s s51.exe $(bindir); $(STRIP) $(bindir)/s51.exe; fi
70         if test -f s51; then $(INSTALL) -s s51 $(bindir); $(STRIP) $(bindir)/s51; fi
71
72
73 # Deleting all the installed files
74 # --------------------------------
75 uninstall:
76         rm -f $(bindir)/s51
77
78
79 # Performing self-test
80 # --------------------
81 check: test
82
83 test: test_ser.ihx
84
85 test_ser.ihx: test_ser.rel
86         $(SDCC) $(SDCFLAGS) $<
87
88 # Performing installation test
89 # ----------------------------
90 installcheck:
91
92
93 # Creating installation directories
94 # ---------------------------------
95 installdirs:
96         test -d $(bindir) || $(INSTALL) -d $(bindir)
97
98
99 # Creating dependencies
100 # ---------------------
101 dep: Makefile.dep
102
103 Makefile.dep: *.cc *.h
104         $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
105
106 include Makefile.dep
107 include clean.mk
108
109 #parser.cc: parser.y
110
111 #plex.cc: plex.l
112
113 # My rules
114 # --------
115 .SUFFIXES: .rel
116
117 s51.src: s51 shared_lib
118
119 s51: $(OBJECTS) $(PRJDIR)/*.a
120         $(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBS) -o s51
121
122 ifeq ($(dlso_ok),yes)
123 shared_lib: $(PRJDIR)/s51.so
124 else
125 shared_lib:
126         @$(PRJDIR)/mkecho $(PRJDIR) "No 51 shared lib made."
127         @$(PRJDIR)/mkecho $(PRJDIR) "(SHAREDLIB="$(SHAREDLIB)",dl_ok="$(dl_ok)",enable_dlso="$(enable_dlso)")"
128 endif
129
130 $(PRJDIR)/s51.so: $(OBJECTS_SHARED)
131         $(CXX) -shared $(OBJECTS_SHARED) -o $(PRJDIR)/s51.so
132
133 otherlibs:
134         cd $(PRJDIR)/cmd.src && $(MAKE) all
135         cd $(PRJDIR)/sim.src && $(MAKE) all
136         $(MAKE) -C $(PRJDIR)/gui.src checkconf ucsim_lib
137
138 .cc.o:
139         $(CXX) $(CXXFLAGS) $(PICOPT) $(CPPFLAGS) -c $< -o $@
140
141 .c.rel:
142         $(SDCC) $(SDCFLAGS) $(SDCPPFLAGS) -c $<
143
144
145 # Remaking configuration
146 # ----------------------
147 checkconf:
148         @if [ -f $(PRJDIR)/devel ]; then\
149           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
150         fi
151
152 # End of s51.src/Makefile.in