2 # uCsim gui.src/Makefile
4 # (c) Drotos Daniel, Talker Bt. 1999
14 top_builddir = @top_builddir@
15 top_srcdir = @top_srcdir@
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
24 LIBS = @LIBS@ @CURSES_LIBS@ -L$(top_builddir)
26 curses_ok = @curses_ok@
29 exec_prefix = @exec_prefix@
33 includedir = @includedir@
35 man1dir = $(mandir)/man1
36 man2dir = $(mandir)/man2
41 enable_serio = @enable_serio@
43 ifeq ($(enable_serio),yes)
48 CURSES_PKGS = $(SERIO_PKG)
52 SOURCES = $(patsubst %.o,%.cc,$(OBJECTS))
55 UCSIM_OBJECTS = gui.o if.o
56 UCSIM_SOURCES = $(patsubst %.o,%.cc,$(UCSIM_OBJECTS))
60 TOOL_SOURCES = $(patsubst %.o,%.cc,$(TOOL_OBJECTS))
62 ALL_SOURCES = $(SOURCES) $(UCSIM_SOURCES) $(TOOL_SOURCES)
65 # Compiling entire program or any subproject
66 # ------------------------------------------
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 ;\
75 # @for pkg in $(PKGS); do\
76 # $(MAKE) -C $$pkg $$pkg ;\
79 gui_api: ucsim_lib tool_lib
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 ..;\
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 ..;\
106 # Performing self-test
107 # --------------------
109 @for pkg in $(CURSES_PKGS); do\
110 $(MAKE) -C $$pkg check ; cd ..;\
116 @for pkg in $(CURSES_PKGS); do\
117 $(MAKE) -C $$pkg test ; cd ..;\
123 # Performing installation test
124 # ----------------------------
125 installcheck: installcheck_gui_api
126 @for pkg in $(CURSES_PKGS); do\
127 $(MAKE) -C $$pkg installcheck ; cd ..;\
130 installcheck_gui_api:
133 # Creating installation directories
134 # ---------------------------------
136 @for pkg in $(CURSES_PKGS); do\
137 $(MAKE) -C $$pkg installdirs ; cd ..;\
141 # Creating dependencies
142 # ---------------------
145 Makefile.dep: $(ALL_SOURCES) $(srcdir)/*.h
146 $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.cc,$^) >Makefile.dep
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 \
152 clean_local clean distclean_local \
153 distclean mostlyclean realclean)" ""
156 include $(srcdir)/clean.mk
161 ucsim_lib: $(top_builddir)libguiucsim.a
163 $(top_builddir)libguiucsim.a: $(OBJECTS) $(UCSIM_OBJECTS)
164 ar -rcu $*.a $(OBJECTS) $(UCSIM_OBJECTS)
167 tool_lib: $(top_builddir)libguitool.a
169 $(top_builddir)libguitool.a: $(OBJECTS) $(TOOL_OBJECTS)
170 ar -rcu $*.a $(OBJECTS) $(TOOL_OBJECTS)
174 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
177 # Remaking configuration
178 # ----------------------
180 @if [ -f $(top_builddir)devel ]; then\
181 $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
184 # End of gui.src/Makefile