Enabled VPATH feature: changed nearly all Makefiles (149 files).
[fw/sdcc] / packihx / Makefile.in
index 8fe6bfc9ef460a2f005088065515a8a61f2c488d..137a7d634211de8ad30d1e74fe56f3d8331bcb7a 100644 (file)
@@ -1,6 +1,9 @@
 PRJDIR          = ..
+VPATH           = @srcdir@
+srcdir          = @srcdir@
+top_builddir    = @top_builddir@
 
-include $(PRJDIR)/Makefile.common
+include $(PRJDIR)/$(top_builddir)Makefile.common
 
 CFLAGS          += -Wall
 
@@ -8,18 +11,18 @@ OBJECTS      = packihx.o
 
 SOURCES                = $(patsubst %.o,%.c,$(OBJECTS))
 
-TARGET         = $(PRJDIR)/bin/packihx
+TARGET         = $(PRJDIR)/$(top_builddir)bin/packihx$(EXEEXT)
 
 all: $(TARGET)
 
 install: all installdirs
-       $(INSTALL) $(TARGET) `echo $(bindir)/packihx|sed '$(transform)'`
-       $(STRIP) `echo $(bindir)/packihx|sed '$(transform)'`
+       $(INSTALL) $(TARGET) `echo $(DESTDIR)$(bindir)/packihx$(EXEEXT)|sed '$(transform)'`
+       $(STRIP) `echo $(DESTDIR)$(bindir)/packihx$(EXEEXT)|sed '$(transform)'`
 
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/packihx
+       rm -f $(DESTDIR)$(bindir)/packihx$(EXEEXT)
 
 # Performing self-test
 # --------------------
@@ -34,7 +37,7 @@ installcheck:
 # Creating installation directories
 # ---------------------------------
 installdirs:
-       $(INSTALL) -d $(bindir)
+       $(INSTALL) -d $(DESTDIR)$(bindir)
 
 
 # Creating dependencies
@@ -50,4 +53,4 @@ $(TARGET): $(OBJECTS)
 
 checkconf:
 
-include clean.mk
+include $(srcdir)/clean.mk