2 # uCsim gui.src/Makefile
4 # (c) Drotos Daniel, Talker Bt. 1999
16 DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
17 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
18 -I$(PRJDIR)/sim.src -I$(PRJDIR)/cmd.src
19 CFLAGS = @CFLAGS@ -Wall
20 CXXFLAGS = @CXXFLAGS@ -Wall
23 LIBS = @LIBS@ @CURSES_LIBS@ -L$(PRJDIR)
25 curses_ok = @curses_ok@
28 exec_prefix = @exec_prefix@
32 includedir = @includedir@
34 man1dir = $(mandir)/man1
35 man2dir = $(mandir)/man2
39 enable_serio = @enable_serio@
41 ifeq ($(enable_serio),yes)
46 CURSES_PKGS = $(SERIO_PKG)
50 SOURCES = $(patsubst %.o,%.cc,$(OBJECTS))
53 UCSIM_OBJECTS = gui.o if.o
54 UCSIM_SOURCES = $(patsubst %.o,%.cc,$(UCSIM_OBJECTS))
58 TOOL_SOURCES = $(patsubst %.o,%.cc,$(TOOL_OBJECTS))
60 ALL_SOURCES = $(SOURCES) $(UCSIM_SOURCES) $(TOOL_SOURCES)
63 # Compiling entire program or any subproject
64 # ------------------------------------------
67 gui.src: checkconf gui_api
68 ifeq ($(curses_ok),yes)
69 @for pkg in dummy $(CURSES_PKGS); do\
70 if test -d $$pkg; then $(MAKE) -C $$pkg $$pkg; else : ; fi ;\
73 # @for pkg in $(PKGS); do\
74 # $(MAKE) -C $$pkg $$pkg ;\
77 gui_api: ucsim_lib tool_lib
80 # Compiling and installing everything and runing test
81 # ---------------------------------------------------
82 install: install_gui_api
83 ifeq ($(curses_ok),yes)
84 @for pkg in $(CURSES_PKGS); do\
85 cd $$pkg && $(MAKE) install ; cd ..;\
92 # Deleting all the installed files
93 # --------------------------------
94 uninstall: uninstall_gui_api
95 ifeq ($(curses_ok),yes)
96 @for pkg in $(CURSES_PKGS); do\
97 cd $$pkg && $(MAKE) uninstall ; cd ..;\
104 # Performing self-test
105 # --------------------
107 @for pkg in $(CURSES_PKGS); do\
108 cd $$pkg && $(MAKE) check ; cd ..;\
114 @for pkg in $(CURSES_PKGS); do\
115 cd $$pkg && $(MAKE) test ; cd ..;\
121 # Performing installation test
122 # ----------------------------
123 installcheck: installcheck_gui_api
124 @for pkg in $(CURSES_PKGS); do\
125 cd $$pkg && $(MAKE) installcheck ; cd ..;\
128 installcheck_gui_api:
131 # Creating installation directories
132 # ---------------------------------
134 @for pkg in $(CURSES_PKGS); do\
135 cd $$pkg && $(MAKE) installdirs ; cd ..;\
139 # Creating dependencies
140 # ---------------------
143 Makefile.dep: $(ALL_SOURCES) *.h
144 $(CXXCPP) -MM $(CPPFLAGS) $(M_OR_MM) $(ALL_SOURCES) >Makefile.dep
152 ucsim_lib: $(PRJDIR)/libguiucsim.a
154 $(PRJDIR)/libguiucsim.a: $(OBJECTS) $(UCSIM_OBJECTS)
155 ar -rcu $*.a $(OBJECTS) $(UCSIM_OBJECTS)
158 tool_lib: $(PRJDIR)/libguitool.a
160 $(PRJDIR)/libguitool.a: $(OBJECTS) $(TOOL_OBJECTS)
161 ar -rcu $*.a $(OBJECTS) $(TOOL_OBJECTS)
165 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
168 # Remaking configuration
169 # ----------------------
171 @if [ -f $(PRJDIR)/devel ]; then\
172 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
175 # End of gui.src/Makefile