* sim/ucsim/main_in.mk, sim/ucsim/avr.src/Makefile.in,
[fw/sdcc] / sim / ucsim / gui.src / Makefile.in
1 #
2 # uCsim gui.src/Makefile
3 #
4 # (c) Drotos Daniel, Talker Bt. 1999
5 #
6
7 SHELL           = /bin/sh
8 CXX             = @CXX@
9 CPP             = @CPP@
10 CXXCPP          = @CXXCPP@
11 RANLIB          = @RANLIB@
12 INSTALL         = @INSTALL@
13
14 top_builddir    = @top_builddir@
15 top_srcdir      = @top_srcdir@
16
17 DEFS            = $(subs -DHAVE_CONFIG_H,,@DEFS@)
18 CPPFLAGS        = @CPPFLAGS@ -I$(srcdir) -I$(top_builddir) -I$(top_srcdir) \
19                   -I$(top_srcdir)/sim.src -I$(top_srcdir)/cmd.src
20 CFLAGS          = @CFLAGS@ -Wall
21 CXXFLAGS        = @CXXFLAGS@ -Wall
22 M_OR_MM         = @M_OR_MM@
23
24 LIBS            = @LIBS@ @CURSES_LIBS@ -L$(top_builddir)
25
26 curses_ok       = @curses_ok@
27
28 prefix          = @prefix@
29 exec_prefix     = @exec_prefix@
30 bindir          = @bindir@
31 libdir          = @libdir@
32 datadir         = @datadir@
33 includedir      = @includedir@
34 mandir          = @mandir@
35 man1dir         = $(mandir)/man1
36 man2dir         = $(mandir)/man2
37 infodir         = @infodir@
38 srcdir          = @srcdir@
39 VPATH           = @srcdir@
40
41 enable_serio    = @enable_serio@
42 PKGS            =
43 ifeq ($(enable_serio),yes)
44 SERIO_PKG       = serio.src
45 else
46 SERIO_PKG       =
47 endif
48 CURSES_PKGS     = $(SERIO_PKG)
49
50 # Common code
51 OBJECTS         = rec.o
52 SOURCES         = $(patsubst %.o,%.cc,$(OBJECTS))
53
54 # uCsim only
55 UCSIM_OBJECTS   = gui.o if.o
56 UCSIM_SOURCES   = $(patsubst %.o,%.cc,$(UCSIM_OBJECTS))
57
58 # Tool only
59 TOOL_OBJECTS    =
60 TOOL_SOURCES    = $(patsubst %.o,%.cc,$(TOOL_OBJECTS))
61
62 ALL_SOURCES     = $(SOURCES) $(UCSIM_SOURCES) $(TOOL_SOURCES)
63
64
65 # Compiling entire program or any subproject
66 # ------------------------------------------
67 all: gui.src
68
69 gui.src: checkconf gui_api
70 ifeq ($(curses_ok),yes)
71         @for pkg in dummy $(CURSES_PKGS); do\
72           if test -f $$pkg/Makefile; then $(MAKE) -C $$pkg $$pkg; else : ; fi ;\
73         done
74 endif
75 #       @for pkg in $(PKGS); do\
76 #         $(MAKE) -C $$pkg $$pkg ;\
77 #       done
78
79 gui_api: ucsim_lib tool_lib
80
81
82 # Compiling and installing everything and runing test
83 # ---------------------------------------------------
84 install: install_gui_api
85 ifeq ($(curses_ok),yes)
86         @for pkg in $(CURSES_PKGS); do\
87           $(MAKE) -C $$pkg install ; cd ..;\
88         done
89 endif
90
91 install_gui_api:
92
93
94 # Deleting all the installed files
95 # --------------------------------
96 uninstall: uninstall_gui_api
97 ifeq ($(curses_ok),yes)
98         @for pkg in $(CURSES_PKGS); do\
99           $(MAKE) -C $$pkg uninstall ; cd ..;\
100         done
101 endif
102
103 uninstall_gui_api:
104
105
106 # Performing self-test
107 # --------------------
108 check: check_local
109         @for pkg in $(CURSES_PKGS); do\
110           $(MAKE) -C $$pkg check ; cd ..;\
111         done
112
113 check_local:
114
115 test: test_local
116         @for pkg in $(CURSES_PKGS); do\
117           $(MAKE) -C $$pkg test ; cd ..;\
118         done
119
120 test_local:
121
122
123 # Performing installation test
124 # ----------------------------
125 installcheck: installcheck_gui_api
126         @for pkg in $(CURSES_PKGS); do\
127           $(MAKE) -C $$pkg installcheck ; cd ..;\
128         done
129
130 installcheck_gui_api:
131
132
133 # Creating installation directories
134 # ---------------------------------
135 installdirs:
136         @for pkg in $(CURSES_PKGS); do\
137           $(MAKE) -C $$pkg installdirs ; cd ..;\
138         done
139
140
141 # Creating dependencies
142 # ---------------------
143 dep: Makefile.dep
144
145 Makefile.dep: $(ALL_SOURCES) $(srcdir)/*.h
146         $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.cc,$^) >Makefile.dep
147
148 # don't include Makefile.dep for the listed targets:
149 ifeq "$(findstring $(MAKECMDGOALS),uninstall uninstall_gui_api \
150                                    check check_local test test_local \
151                                    checkconf \
152                                    clean_local clean distclean_local \
153                                    distclean mostlyclean realclean)" ""
154   include Makefile.dep
155 endif
156 include $(srcdir)/clean.mk
157
158
159 # My rules
160 # --------
161 ucsim_lib: $(top_builddir)libguiucsim.a
162
163 $(top_builddir)libguiucsim.a: $(OBJECTS) $(UCSIM_OBJECTS)
164         ar -rcu $*.a $(OBJECTS) $(UCSIM_OBJECTS)
165         $(RANLIB) $*.a
166
167 tool_lib: $(top_builddir)libguitool.a
168
169 $(top_builddir)libguitool.a: $(OBJECTS) $(TOOL_OBJECTS)
170         ar -rcu $*.a $(OBJECTS) $(TOOL_OBJECTS)
171         $(RANLIB) $*.a
172
173 .cc.o:
174         $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
175
176
177 # Remaking configuration
178 # ----------------------
179 checkconf:
180         @if [ -f $(top_builddir)devel ]; then\
181           $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
182         fi
183
184 # End of gui.src/Makefile