version 0.5.2
[fw/sdcc] / sim / ucsim / cmd.src / Makefile.in
1 #
2 # ucsim cmd.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 LEX             = @LEX@
17 YACC            = @YACC@
18 BISON_PLUS_PLUS = @BISON_PLUS_PLUS@
19
20 PRJDIR          = ..
21
22 DEFS            = $(subs -DHAVE_CONFIG_H,,@DEFS@)
23 CPPFLAGS        = @CPPFLAGS@ -I. -I$(PRJDIR) \
24                   -I$(PRJDIR)/sim.src -I$(PRJDIR)/gui.src
25 CFLAGS          = @CFLAGS@ -Wall
26 CXXFLAGS        = @CXXFLAGS@ -Wall
27 M_OR_MM         = @M_OR_MM@
28
29 prefix          = @prefix@
30 exec_prefix     = @exec_prefix@
31 bindir          = @bindir@
32 libdir          = @libdir@
33 datadir         = @datadir@
34 includedir      = @includedir@
35 mandir          = @mandir@
36 man1dir         = $(mandir)/man1
37 man2dir         = $(mandir)/man2
38 infodir         = @infodir@
39 srcdir          = @srcdir@
40
41 OBJECTS         = cmdset.o command.o newcmd.o cmdutil.o syntax.o \
42                   get.o set.o timer.o bp.o info.o show.o cmdgui.o cmdconf.o \
43                   cmduc.o cmdstat.o cmdmem.o \
44                   cmdpars.o cmdlex.o
45
46
47 # Compiling entire program or any subproject
48 # ------------------------------------------
49 all: checkconf cmdlib
50
51 cmd.src: all
52
53
54 # Compiling and installing everything and runing test
55 # ---------------------------------------------------
56 install: all installdirs
57
58
59 # Deleting all the installed files
60 # --------------------------------
61 uninstall:
62
63
64 # Performing self-test
65 # --------------------
66 check:
67
68 test:
69
70
71 # Performing installation test
72 # ----------------------------
73 installcheck:
74
75
76 # Creating installation directories
77 # ---------------------------------
78 installdirs:
79
80
81 # Creating dependencies
82 # ---------------------
83 dep: Makefile.dep
84
85 Makefile.dep: *.cc *.h
86         $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
87
88 include Makefile.dep
89 include clean.mk
90
91 cmdpars.cc: cmdpars.y
92
93 cmdlex.cc: cmdlex.l cmdpars.h
94
95 # My rules
96 # --------
97
98 cmdlib: $(PRJDIR)/libcmd.a
99
100 $(PRJDIR)/libcmd.a: $(OBJECTS)
101         ar -rcu $*.a $(OBJECTS)
102         $(RANLIB) $*.a
103
104 .cc.o:
105         $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
106
107 #.y.cc:
108 #       rm -f $*.cc $*.h
109 #       $(YACC) -d $<
110 #       mv y.tab.c $*.cc
111 #       mv y.tab.h $*.h
112
113 .y.cc:
114         rm -f $*.cc $*.h
115         $(BISON_PLUS_PLUS) -d -o $*.cc $<
116
117 .l.cc:
118         rm -f $*.cc
119         $(LEX) --c++ -o $*.cc $<
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 cmd.src/Makefile.in