4621566eb4ba46555646c7466f7ef91d0d62dcc2
[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 WINSOCK_AVAIL   = @WINSOCK_AVAIL@
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 VPATH           = @srcdir@
43
44 OBJECTS         = cmdset.o command.o cmdutil.o syntax.o \
45                   get.o set.o timer.o bp.o info.o show.o cmdgui.o cmdconf.o \
46                   cmduc.o cmdstat.o cmdmem.o \
47                   cmdpars.o cmdlex.o newcmd.o
48
49 ifeq ($(WINSOCK_AVAIL), 1)
50 OBJECTS += newcmdwin32.o
51 else
52 OBJECTS += newcmdposix.o
53 endif
54
55 DEVEL           = $(shell ( bash -c "test -e $(top_builddir)devel && echo yes" ))
56
57 # Compiling entire program or any subproject
58 # ------------------------------------------
59 all: checkconf cmdlib
60
61 cmd.src: all
62
63
64 # Compiling and installing everything and runing test
65 # ---------------------------------------------------
66 install: all installdirs
67
68
69 # Deleting all the installed files
70 # --------------------------------
71 uninstall:
72
73
74 # Performing self-test
75 # --------------------
76 check:
77
78 test:
79
80
81 # Performing installation test
82 # ----------------------------
83 installcheck:
84
85
86 # Creating installation directories
87 # ---------------------------------
88 installdirs:
89
90
91 # Creating dependencies
92 # ---------------------
93 dep: Makefile.dep
94
95 Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h
96         $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(addprefix $(srcdir)/, $(OBJECTS:.o=.cc)) >Makefile.dep
97
98 include Makefile.dep
99 include $(srcdir)/clean.mk
100
101 cmdpars.cc: cmdpars.y
102
103 ifeq ($(DEVEL),yes)
104   cmdlex.cc: cmdlex.l cmdpars.h
105 endif
106
107 # My rules
108 # --------
109
110 cmdlib: $(top_builddir)libcmd.a
111
112 $(top_builddir)libcmd.a: $(OBJECTS)
113         ar -rcu $*.a $(OBJECTS)
114         $(RANLIB) $*.a
115
116 .cc.o:
117         $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
118
119 #.y.cc:
120 #       rm -f $*.cc $*.h
121 #       $(YACC) -d $<
122 #       mv y.tab.c $*.cc
123 #       mv y.tab.h $*.h
124
125 ifeq ($(DEVEL),yes)
126 .y.cc:
127         rm -f $*.cc $*.h
128         $(BISON_PLUS_PLUS) -d -o $*.cc $<
129
130 .l.cc:
131         rm -f $*.cc
132         $(LEX) --c++ -o $*.cc $<
133 endif
134
135
136 # Remaking configuration
137 # ----------------------
138 checkconf:
139         @if [ -f $(top_builddir)devel ]; then\
140           $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
141         fi
142
143 # End of cmd.src/Makefile.in