Added some regression tests from patch #2321830
[fw/sdcc] / support / librarian / Makefile.in
index c1a6739828b91e321ece49ff8f88f036359a9f52..1578be998c5c52ff15d5447381ec5492edd0f99c 100644 (file)
@@ -1,6 +1,8 @@
-PRJDIR          = ../..
+VPATH        = @srcdir@
+srcdir       = @srcdir@
+top_builddir = @top_builddir@
 
-include $(PRJDIR)/Makefile.common
+include $(top_builddir)/Makefile.common
 
 CFLAGS          += -Wall
 
@@ -8,18 +10,18 @@ OBJECTS      = sdcclib.o
 
 SOURCES                = $(patsubst %.o,%.c,$(OBJECTS))
 
-TARGET         = $(PRJDIR)/bin/sdcclib$(EXEEXT)
+TARGET         = $(top_builddir)/bin/sdcclib$(EXEEXT)
 
 all: $(TARGET)
 
 install: all installdirs
-       $(INSTALL) $(TARGET) `echo $(bindir)/sdcclib$(EXEEXT)|sed '$(transform)'`
-       $(STRIP) `echo $(bindir)/sdcclib$(EXEEXT)|sed '$(transform)'`
+       $(INSTALL) $(TARGET) `echo $(DESTDIR)$(bindir)/sdcclib$(EXEEXT)|sed '$(transform)'`
+       $(STRIP) `echo $(DESTDIR)$(bindir)/sdcclib$(EXEEXT)|sed '$(transform)'`
 
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/sdcclib$(EXEEXT)
+       rm -f $(DESTDIR)$(bindir)/sdcclib$(EXEEXT)
 
 # Performing self-test
 # --------------------
@@ -34,7 +36,7 @@ installcheck:
 # Creating installation directories
 # ---------------------------------
 installdirs:
-       $(INSTALL) -d $(bindir)
+       $(INSTALL) -d $(DESTDIR)$(bindir)
 
 
 # Creating dependencies
@@ -50,4 +52,4 @@ $(TARGET): $(OBJECTS)
 
 checkconf:
 
-include clean.mk
+include $(srcdir)/clean.mk