X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=sim%2Fucsim%2Fgui.src%2FMakefile.in;h=84db819b68f455f37f1c3711c6f392c08cd4f709;hb=6947ba235772f04a3f916a611be619f428d2250b;hp=1364969cf22067dd3bfb0ae8a28e77619624b7cb;hpb=72b7e8dadd92279596c0f56649775fc056acf449;p=fw%2Fsdcc diff --git a/sim/ucsim/gui.src/Makefile.in b/sim/ucsim/gui.src/Makefile.in index 1364969c..84db819b 100644 --- a/sim/ucsim/gui.src/Makefile.in +++ b/sim/ucsim/gui.src/Makefile.in @@ -11,16 +11,17 @@ CXXCPP = @CXXCPP@ RANLIB = @RANLIB@ INSTALL = @INSTALL@ -PRJDIR = .. +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@) -CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \ - -I$(PRJDIR)/sim.src -I$(PRJDIR)/cmd.src +CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(top_builddir) -I$(top_srcdir) \ + -I$(top_srcdir)/sim.src -I$(top_srcdir)/cmd.src CFLAGS = @CFLAGS@ -Wall CXXFLAGS = @CXXFLAGS@ -Wall M_OR_MM = @M_OR_MM@ -LIBS = @LIBS@ @CURSES_LIBS@ -L$(PRJDIR) +LIBS = @LIBS@ @CURSES_LIBS@ -L$(top_builddir) curses_ok = @curses_ok@ @@ -35,6 +36,7 @@ man1dir = $(mandir)/man1 man2dir = $(mandir)/man2 infodir = @infodir@ srcdir = @srcdir@ +VPATH = @srcdir@ enable_serio = @enable_serio@ PKGS = @@ -43,7 +45,7 @@ SERIO_PKG = serio.src else SERIO_PKG = endif -CURSES_PKGS = $(SERIO.PKG) +CURSES_PKGS = $(SERIO_PKG) # Common code OBJECTS = rec.o @@ -67,7 +69,7 @@ all: gui.src gui.src: checkconf gui_api ifeq ($(curses_ok),yes) @for pkg in dummy $(CURSES_PKGS); do\ - if test -d $$pkg; then $(MAKE) -C $$pkg $$pkg; else : ; fi ;\ + if test -f $$pkg/Makefile; then $(MAKE) -C $$pkg $$pkg; else : ; fi ;\ done endif # @for pkg in $(PKGS); do\ @@ -81,8 +83,8 @@ gui_api: ucsim_lib tool_lib # --------------------------------------------------- install: install_gui_api ifeq ($(curses_ok),yes) - @for pkg in $(PKGS); do\ - cd $$pkg && $(MAKE) install ; cd ..;\ + @for pkg in $(CURSES_PKGS); do\ + $(MAKE) -C $$pkg install ; cd ..;\ done endif @@ -93,8 +95,8 @@ install_gui_api: # -------------------------------- uninstall: uninstall_gui_api ifeq ($(curses_ok),yes) - @for pkg in $(PKGS); do\ - cd $$pkg && $(MAKE) uninstall ; cd ..;\ + @for pkg in $(CURSES_PKGS); do\ + $(MAKE) -C $$pkg uninstall ; cd ..;\ done endif @@ -104,15 +106,15 @@ uninstall_gui_api: # Performing self-test # -------------------- check: check_local - @for pkg in $(PKGS); do\ - cd $$pkg && $(MAKE) check ; cd ..;\ + @for pkg in $(CURSES_PKGS); do\ + $(MAKE) -C $$pkg check ; cd ..;\ done check_local: test: test_local - @for pkg in $(PKGS); do\ - cd $$pkg && $(MAKE) test ; cd ..;\ + @for pkg in $(CURSES_PKGS); do\ + $(MAKE) -C $$pkg test ; cd ..;\ done test_local: @@ -121,8 +123,8 @@ test_local: # Performing installation test # ---------------------------- installcheck: installcheck_gui_api - @for pkg in $(PKGS); do\ - cd $$pkg && $(MAKE) installcheck ; cd ..;\ + @for pkg in $(CURSES_PKGS); do\ + $(MAKE) -C $$pkg installcheck ; cd ..;\ done installcheck_gui_api: @@ -131,8 +133,8 @@ installcheck_gui_api: # Creating installation directories # --------------------------------- installdirs: - @for pkg in $(PKGS); do\ - cd $$pkg && $(MAKE) installdirs ; cd ..;\ + @for pkg in $(CURSES_PKGS); do\ + $(MAKE) -C $$pkg installdirs ; cd ..;\ done @@ -140,24 +142,31 @@ installdirs: # --------------------- dep: Makefile.dep -Makefile.dep: $(ALL_SOURCES) *.h - $(CXXCPP) -MM $(CPPFLAGS) $(M_OR_MM) $(ALL_SOURCES) >Makefile.dep +Makefile.dep: $(ALL_SOURCES) $(srcdir)/*.h + $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.cc,$^) >Makefile.dep -include Makefile.dep -include clean.mk +# don't include Makefile.dep for the listed targets: +ifeq "$(findstring $(MAKECMDGOALS),uninstall uninstall_gui_api \ + check check_local test test_local \ + checkconf \ + clean_local clean distclean_local \ + distclean mostlyclean realclean)" "" + include Makefile.dep +endif +include $(srcdir)/clean.mk # My rules # -------- -ucsim_lib: $(PRJDIR)/libguiucsim.a +ucsim_lib: $(top_builddir)libguiucsim.a -$(PRJDIR)/libguiucsim.a: $(OBJECTS) $(UCSIM_OBJECTS) +$(top_builddir)libguiucsim.a: $(OBJECTS) $(UCSIM_OBJECTS) ar -rcu $*.a $(OBJECTS) $(UCSIM_OBJECTS) $(RANLIB) $*.a -tool_lib: $(PRJDIR)/libguitool.a +tool_lib: $(top_builddir)libguitool.a -$(PRJDIR)/libguitool.a: $(OBJECTS) $(TOOL_OBJECTS) +$(top_builddir)libguitool.a: $(OBJECTS) $(TOOL_OBJECTS) ar -rcu $*.a $(OBJECTS) $(TOOL_OBJECTS) $(RANLIB) $*.a @@ -168,8 +177,8 @@ $(PRJDIR)/libguitool.a: $(OBJECTS) $(TOOL_OBJECTS) # Remaking configuration # ---------------------- checkconf: - @if [ -f $(PRJDIR)/devel ]; then\ - $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\ + @if [ -f $(top_builddir)devel ]; then\ + $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\ fi # End of gui.src/Makefile