fixes of curses lib detection
[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
16 PRJDIR          = ..
17
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
23 M_OR_MM         = @M_OR_MM@
24
25 SDCC            = sdcc
26 SDCFLAGS        = --debug --stack-after-data --model-small
27 SDCPPFLAGS      = 
28
29 LIBS            = @LIBS@ -L$(PRJDIR) -lutil -lsim -lcmd
30
31 prefix          = @prefix@
32 exec_prefix     = @exec_prefix@
33 bindir          = @bindir@
34 libdir          = @libdir@
35 datadir         = @datadir@
36 includedir      = @includedir@
37 mandir          = @mandir@
38 man1dir         = $(mandir)/man1
39 man2dir         = $(mandir)/man2
40 infodir         = @infodir@
41 srcdir          = @srcdir@
42
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
48
49
50 # Compiling entire program or any subproject
51 # ------------------------------------------
52 all: checkconf otherlibs s51.src
53
54 tests: test_ser.ihx
55
56 test_ser.ihx: test_ser.rel
57         $(SDCC) $(SDCFLAGS) $<
58
59
60 # Compiling and installing everything and runing test
61 # ---------------------------------------------------
62 install: all installdirs
63         $(INSTALL) -s s51 $(bindir)
64
65
66 # Deleting all the installed files
67 # --------------------------------
68 uninstall:
69         rm -f $(bindir)/s51
70
71
72 # Performing self-test
73 # --------------------
74 check:
75
76
77 # Performing installation test
78 # ----------------------------
79 installcheck:
80
81
82 # Creating installation directories
83 # ---------------------------------
84 installdirs:
85         test -d $(bindir) || $(INSTALL) -d $(bindir)
86
87
88 # Creating dependencies
89 # ---------------------
90 dep: Makefile.dep
91
92 Makefile.dep: *.cc *.h
93         $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
94
95 include Makefile.dep
96 include clean.mk
97
98 #parser.cc: parser.y
99
100 #plex.cc: plex.l
101
102 # My rules
103 # --------
104 .SUFFIXES: .rel
105
106 s51.src: s51
107
108 s51: $(OBJECTS) $(PRJDIR)/*.a
109         $(CXX) $(CXXFLAGS) -o s51 $(OBJECTS) $(LIBS)
110
111 otherlibs:
112         cd $(PRJDIR)/cmd.src && $(MAKE) all
113         cd $(PRJDIR)/sim.src && $(MAKE) all
114
115 .cc.o:
116         $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
117
118 .c.rel:
119         $(SDCC) $(SDCFLAGS) $(SDCPPFLAGS) -c $<
120
121
122 # Remaking configuration
123 # ----------------------
124 checkconf:
125         @if [ -f $(PRJDIR)/devel ]; then\
126           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
127         fi
128
129 # End of s51.src/Makefile.in