2 # uCsim s51.src/Makefile
4 # (c) Drotos Daniel, Talker Bt. 1997
18 DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
19 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
20 -I$(PRJDIR)/cmd.src -I$(PRJDIR)/sim.src
21 CFLAGS = @CFLAGS@ -Wall
22 CXXFLAGS = @CXXFLAGS@ -Wall
26 SDCFLAGS = --debug --stack-after-data --model-small
29 LIBS = @LIBS@ -L$(PRJDIR) -lutil -lsim -lcmd
32 exec_prefix = @exec_prefix@
36 includedir = @includedir@
38 man1dir = $(mandir)/man1
39 man2dir = $(mandir)/man2
43 OBJECTS = s51.o glob.o sim51.o cmd51.o \
44 inc.o jmp.o mov.o logic.o arith.o bit.o \
45 timer0.o timer1.o timer2.o serial.o port.o interrupt.o \
46 uc51.o uc52.o uc51r.o uc89c51r.o uc251.o \
47 cmd.o dump.o go.o cmd_brk.o set.o where.o show.o
50 # Compiling entire program or any subproject
51 # ------------------------------------------
52 all: checkconf otherlibs s51.src
56 test_ser.ihx: test_ser.rel
57 $(SDCC) $(SDCFLAGS) $<
60 # Compiling and installing everything and runing test
61 # ---------------------------------------------------
62 install: all installdirs
63 $(INSTALL) -s s51 $(bindir)
66 # Deleting all the installed files
67 # --------------------------------
72 # Performing self-test
73 # --------------------
77 # Performing installation test
78 # ----------------------------
82 # Creating installation directories
83 # ---------------------------------
85 test -d $(bindir) || $(INSTALL) -d $(bindir)
88 # Creating dependencies
89 # ---------------------
92 Makefile.dep: *.cc *.h
93 $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
108 s51: $(OBJECTS) $(PRJDIR)/*.a
109 $(CXX) $(CXXFLAGS) -o s51 $(OBJECTS) $(LIBS)
112 cd $(PRJDIR)/cmd.src && $(MAKE) all
113 cd $(PRJDIR)/sim.src && $(MAKE) all
116 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
119 $(SDCC) $(SDCFLAGS) $(SDCPPFLAGS) -c $<
122 # Remaking configuration
123 # ----------------------
125 @if [ -f $(PRJDIR)/devel ]; then\
126 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
129 # End of s51.src/Makefile.in