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