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
40 CURSES_PKGS = serio.src
44 SOURCES = $(patsubst %.o,%.cc,$(OBJECTS))
47 UCSIM_OBJECTS = gui.o if.o
48 UCSIM_SOURCES = $(patsubst %.o,%.cc,$(UCSIM_OBJECTS))
52 TOOL_SOURCES = $(patsubst %.o,%.cc,$(TOOL_OBJECTS))
54 ALL_SOURCES = $(SOURCES) $(UCSIM_SOURCES) $(TOOL_SOURCES)
57 # Compiling entire program or any subproject
58 # ------------------------------------------
61 gui.src: checkconf gui_api
62 ifeq ($(curses_ok),yes)
63 @for pkg in $(CURSES_PKGS); do\
64 $(MAKE) -C $$pkg $$pkg ;\
67 # @for pkg in $(PKGS); do\
68 # $(MAKE) -C $$pkg $$pkg ;\
71 gui_api: ucsim_lib tool_lib
74 # Compiling and installing everything and runing test
75 # ---------------------------------------------------
76 install: install_gui_api
77 @for pkg in $(PKGS); do\
78 cd $$pkg && $(MAKE) install ; cd ..;\
84 # Deleting all the installed files
85 # --------------------------------
86 uninstall: uninstall_gui_api
87 @for pkg in $(PKGS); do\
88 cd $$pkg && $(MAKE) uninstall ; cd ..;\
94 # Performing self-test
95 # --------------------
97 @for pkg in $(PKGS); do\
98 cd $$pkg && $(MAKE) check ; cd ..;\
104 # Performing installation test
105 # ----------------------------
106 installcheck: installcheck_gui_api
107 @for pkg in $(PKGS); do\
108 cd $$pkg && $(MAKE) installcheck ; cd ..;\
111 installcheck_gui_api:
114 # Creating installation directories
115 # ---------------------------------
117 @for pkg in $(PKGS); do\
118 cd $$pkg && $(MAKE) installdirs ; cd ..;\
122 # Creating dependencies
123 # ---------------------
126 Makefile.dep: $(ALL_SOURCES) *.h
127 $(CXXCPP) -MM $(CPPFLAGS) $(M_OR_MM) $(ALL_SOURCES) >Makefile.dep
135 ucsim_lib: $(PRJDIR)/libguiucsim.a
137 $(PRJDIR)/libguiucsim.a: $(OBJECTS) $(UCSIM_OBJECTS)
138 $(AR) -rcu $*.a $(OBJECTS) $(UCSIM_OBJECTS)
141 tool_lib: $(PRJDIR)/libguitool.a
143 $(PRJDIR)/libguitool.a: $(OBJECTS) $(TOOL_OBJECTS)
144 $(AR) -rcu $*.a $(OBJECTS) $(TOOL_OBJECTS)
148 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
151 # Remaking configuration
152 # ----------------------
154 @if [ -f $(PRJDIR)/devel ]; then\
155 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
158 # End of gui.src/Makefile