* device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on ppc-osx (Darwin) does...
[fw/sdcc] / device / lib / Makefile.in
index 3539dc77ef59d2b33e859390c5f00160e2124ab0..4e192d87ea40a41e05b09377a522852b546ee3c5 100644 (file)
@@ -12,6 +12,12 @@ CPP          = @CPP@
 INSTALL                = @INSTALL@
 CP              = @CP@
 
+ifeq ($(shell uname -s),Linux)
+CP_U   = $(CP) -u
+else
+CP_U   = $(CP)
+endif
+
 PRJDIR         = ../..
 INCDIR         = $(PRJDIR)/device/include
 ifndef PORTINCDIR
@@ -255,10 +261,10 @@ port-specific-objects:
        fi
 
 port-specific-objects-pic16:
-       if [ -d $(PORT) ]; then \
+       -if [ -d $(PORT) ]; then \
          mkdir -p $(PORT)/bin; \
          $(MAKE) -C $(PORT); \
-         cp -f $(PORT)/bin/*.o $(PORT)/bin/*.lib $(PORTDIR); \
+         cp -f $(PORT)/bin/*.* $(PORTDIR); \
        fi
 
 lib-files:
@@ -273,9 +279,9 @@ clean_intermediate-pic16:
 # Compiling and installing everything and runing test
 # ---------------------------------------------------
 install: all installdirs
-       cp -r -u $(BUILDDIR)/* $(sdcc_libdir)
-       cp -r -u ds390 ds400 gbz80 z80 hc08 *.c $(sdcc_libdir)/src
-       rm -r `find $(sdcc_libdir)/src -name '*.rel' -or -name '*.dump*' -or -name '*.sym' -or -name '*.o' -or -name '*.lst' -or -name '*.asm' -or -name 'CVS'`
+       $(CP_U) -r $(BUILDDIR)/* $(sdcc_libdir)
+       $(CP_U) -r ds390 ds400 gbz80 z80 hc08 *.c $(sdcc_libdir)/src
+       rm -r `find $(sdcc_libdir)/src -name '*.rel' -o -name '*.dump*' -o -name '*.sym' -o -name '*.o' -o -name '*.lst' -o -name '*.asm' -o -name 'CVS'`
 
 # Deleting all the installed files
 # --------------------------------