* */Makefile.in: removed annoying warning:
[fw/sdcc] / as / hc08 / Makefile.in
index e9d5b9928b081f1b86f0481fe076804668b1fa2e..efb96986828fa8c0c32d5866706d9310c7a27181 100644 (file)
@@ -13,7 +13,8 @@ CPP           = @CPP@
 INSTALL                = @INSTALL@
 STRIP           = @STRIP@
 
-PRJDIR         = ../..
+top_builddir   = @top_builddir@
+top_srcdir     = @top_srcdir@
 
 srcdir         = @srcdir@
 prefix         = @prefix@
@@ -21,6 +22,7 @@ exec_prefix     = @exec_prefix@
 bindir          = @bindir@
 libdir          = @libdir@
 datadir         = @datadir@
+datarootdir     = @datarootdir@
 includedir      = @includedir@
 mandir          = @mandir@
 man1dir         = $(mandir)/man1
@@ -29,24 +31,20 @@ infodir         = @info@
 
 EXEEXT          = @EXEEXT@
 
-CPPFLAGS       = @CPPFLAGS@ -I. -I$(PRJDIR)
+VPATH           = @srcdir@
+
+CPPFLAGS       = @CPPFLAGS@ -I. -I$(srcdir)
 CFLAGS         = @CFLAGS@ -Wall
 M_OR_MM                = @M_OR_MM@
 LDFLAGS                = @LDFLAGS@
 
 ASOBJECTS      = asmain.o aslex.o assym.o assubr.o asnoice.o \
                  asexpr.o asdata.o aslist.o asout.o asstore.o \
-                 m08ext.o m08pst.o m08mch.o m08adr.o strcmpi.o
+                 m08ext.o m08pst.o m08mch.o m08adr.o \
+                 ../strcmpi.o
 ASSOURCES      = $(patsubst %.o,%.c,$(ASOBJECTS))
 
-LKOBJECTS      = lkmain.o lkhead.o lkarea.o lkdata.o \
-                 lkeval.o lklex.o lksym.o lkrloc.o \
-                 lklibr.o lklist.o lkihx.o lks19.o \
-                 lkstore.o lknoice.o lkmem.o lkaomf51.o strcmpi.o
-LKSOURCES      = $(patsubst %.o,%.c,$(LKOBJECTS))
-
-ASHC08         = $(PRJDIR)/bin/as-hc08$(EXEEXT)
-ASLINK         = $(PRJDIR)/bin/link-hc08$(EXEEXT)
+ASHC08         = $(top_builddir)/bin/as-hc08$(EXEEXT)
 
 transform       = @program_transform_name@
 
@@ -57,21 +55,16 @@ all: checkconf $(ASHC08) $(ASLINK)
 $(ASHC08): $(ASOBJECTS)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASOBJECTS) 
 
-$(ASLINK): $(LKOBJECTS)
-       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LKOBJECTS)
-
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
-       $(INSTALL) $(ASHC08) `echo $(bindir)/as-hc08$(EXEEXT)|sed '$(transform)'`
-       $(STRIP) `echo $(bindir)/as-hc08$(EXEEXT)|sed '$(transform)'`
-       $(INSTALL) $(ASLINK) `echo $(bindir)/link-hc08$(EXEEXT)|sed '$(transform)'`
-       $(STRIP) `echo $(bindir)/link-hc08$(EXEEXT)|sed '$(transform)'`
+       $(INSTALL) $(ASHC08) `echo $(DESTDIR)$(bindir)/as-hc08$(EXEEXT)|sed '$(transform)'`
+       $(STRIP) `echo $(DESTDIR)$(bindir)/as-hc08$(EXEEXT)|sed '$(transform)'`
 
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       rm -f $(bindir)/as-hc08$(EXEEXT) $(bindir)/link-hc08$(EXEEXT)
+       rm -f $(DESTDIR)$(bindir)/as-hc08$(EXEEXT)
 
 
 # Performing self-test
@@ -87,18 +80,21 @@ installcheck:
 # Creating installation directories
 # ---------------------------------
 installdirs:
-       $(INSTALL) -d $(bindir)
+       $(INSTALL) -d $(DESTDIR)$(bindir)
 
 
 # Creating dependencies
 # ---------------------
 dep: Makefile.dep
 
-Makefile.dep: $(ASSOURCES) $(LKSOURCES) *.h $(PRJDIR)/*.h
-       $(CPP) $(CPPFLAGS) $(M_OR_MM) $(ASSOURCES) $(LKSOURCES) >Makefile.dep
+Makefile.dep: $(ASSOURCES) $(srcdir)/*.h $(top_builddir)/*.h $(top_srcdir)/*.h
+       $(CPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.c,$^) >Makefile.dep
 
-include Makefile.dep
-include clean.mk
+ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs \
+                                   clean distclean mostlyclean realclean)" ""
+  -include Makefile.dep
+endif
+include $(srcdir)/clean.mk
 
 # My rules
 # --------
@@ -109,8 +105,8 @@ include clean.mk
 # 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 Makefile