Enabled VPATH feature: changed nearly all Makefiles (149 files).
[fw/sdcc] / sim / ucsim / gui.src / obsolete / portmon.src / Makefile.in
index 9ba4c00a83cd9304d15080892c16fb95ee49bf96..eb5b6151207f2ad3cdc08a25f75d09f9c18bc9c5 100644 (file)
@@ -11,16 +11,17 @@ CXXCPP              = @CXXCPP@
 RANLIB         = @RANLIB@
 INSTALL                = @INSTALL@
 
-PRJDIR         = ../..
+top_builddir   = @top_builddir@
+top_srcdir     = @top_srcdir@
 PKGDIR         = ../
 
 DEFS            = $(subs -DHAVE_CONFIG_H,,@DEFS@)
-CPPFLAGS        = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PKGDIR)
+CPPFLAGS        = @CPPFLAGS@ -I. -I$(top_builddir) -I$(PKGDIR)
 CFLAGS          = @CFLAGS@ -Wall
 CXXFLAGS        = @CXXFLAGS@ -Wall
 M_OR_MM         = @M_OR_MM@
 
-LIBS           = -L$(PRJDIR) -L$(PKGDIR) -lgui @CURSES_LIBS@ -lutil @LIBS@
+LIBS           = -L$(top_builddir) -L$(PKGDIR) -lgui @CURSES_LIBS@ -lutil @LIBS@
 
 curses_ok      = @curses_ok@
 
@@ -77,8 +78,8 @@ installdirs:
 # ---------------------
 dep: Makefile.dep
 
-Makefile.dep: *.cc *.h $(PRJDIR)/*.h $(PKGDIR)/*.h
-       $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
+Makefile.dep: $(srcdir)/*.cc $(top_builddir)*.h $(PKGDIR)/*.h
+       $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.cc,$^) >Makefile.dep
 
 include Makefile.dep
 include clean.mk
@@ -95,13 +96,13 @@ else
 portmon.src:
 endif
 
-portmon: $(OBJECTS) $(PRJDIR)/*.a $(PKGDIR)/*.a
+portmon: $(OBJECTS) $(top_builddir)*.a $(PKGDIR)/*.a
        $(CXX) $(CXXFLAGS) -o portmon $(OBJECTS) $(LIBS)
 
 ifeq ($(curses_ok),yes)
 otherlibs:
-       cd $(PRJDIR) && $(MAKE) libs
-       cd $(PKGDIR) && $(MAKE) libs
+       $(MAKE) -C $(top_builddir) libs
+       $(MAKE) -C $(PKGDIR) libs
 else
 otherlibs:
 endif
@@ -123,8 +124,8 @@ endif
 # 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/portmon.src/Makefile.in