include_dir_suffix = @include_dir_suffix@
-sdcc_includedir = $(datadir)/$(include_dir_suffix)
+sdcc_includedir = $(DESTDIR)$(datadir)/$(include_dir_suffix)
CPPFLAGS = @CPPFLAGS@ -I$(PRJDIR)
# ------------------------------------------
all:
-# Compiling and installing everything and runing test
-# ---------------------------------------------------
+# Compiling and installing everything and running test
+# ----------------------------------------------------
install: all installdirs
- $(CP) asm/*/features.h *.h $(sdcc_includedir)
+ $(CP) -r asm *.h $(sdcc_includedir)
+ if [ "`grep pic16 ../../ports.build`" = pic16 ]; then \
+ $(CP) pic16/*.h $(sdcc_includedir)/pic16 ; \
+ fi
+ rm -rf `find $(sdcc_includedir) -type d -name 'CVS'`
# Deleting all the installed files
# ---------------------------------
installdirs:
[ -d $(sdcc_includedir) ] || mkdir -p $(sdcc_includedir)
+ [ -d $(sdcc_includedir)/pic16 ] || mkdir -p $(sdcc_includedir)/pic16
# Creating dependencies