X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device%2Finclude%2FMakefile.in;h=70fb7a6693d1e74caf98f6e287e9089ffdbdd9a3;hb=bfd7431078b6d902b991d098798911bd612bf670;hp=1d0717921ddc27a4358faf3c4f75e0e93647f283;hpb=1dc186b793ade0a904f642c0cb497c418009cd34;p=fw%2Fsdcc diff --git a/device/include/Makefile.in b/device/include/Makefile.in index 1d071792..70fb7a66 100644 --- a/device/include/Makefile.in +++ b/device/include/Makefile.in @@ -7,19 +7,18 @@ VERSIONHI = @VERSIONHI@ VERSIONLO = @VERSIONLO@ VERSIONP = @VERSIONP@ -SHELL = /bin/sh -CPP = @CPP@ -INSTALL = @INSTALL@ +SHELL = /bin/sh +CPP = @CPP@ +INSTALL = @INSTALL@ CP = @CP@ -PRJDIR = .. +PRJDIR = .. prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = @libdir@ datadir = @datadir@ -sdcc_datadir = @sdcc_datadir@ includedir = @includedir@ mandir = @mandir@ man1dir = $(mandir)/man1 @@ -27,6 +26,10 @@ man2dir = $(mandir)/man2 infodir = @infodir@ srcdir = @srcdir@ +include_dir_suffix = @include_dir_suffix@ + +sdcc_includedir = $(DESTDIR)$(datadir)/$(include_dir_suffix) + CPPFLAGS = @CPPFLAGS@ -I$(PRJDIR) @@ -34,17 +37,32 @@ CPPFLAGS = @CPPFLAGS@ -I$(PRJDIR) # ------------------------------------------ all: - -# Compiling and installing everything and runing test -# --------------------------------------------------- +# Compiling and installing everything and running test +# ---------------------------------------------------- install: all installdirs - $(CP) -r asm *.h $(sdcc_datadir)/include/ + $(CP) -r asm *.h $(sdcc_includedir) + if [ "`grep mcs51 ../../ports.build`" = mcs51 ]; then \ + $(CP) mcs51/*.h $(sdcc_includedir)/mcs51 ; \ + fi + if [ "`grep '^pic$$' ../../ports.build`" = pic ]; then \ + $(CP) pic/*.h pic/*.inc pic/*.txt $(sdcc_includedir)/pic ; \ + fi + if [ "`grep pic16 ../../ports.build`" = pic16 ]; then \ + $(CP) pic16/*.h $(sdcc_includedir)/pic16 ; \ + fi + if [ "`grep z80 ../../ports.build`" = z80 ]; then \ + $(CP) z80/*.h $(sdcc_includedir)/z80 ; \ + fi + if [ "`grep hc08 ../../ports.build`" = hc08 ]; then \ + $(CP) hc08/*.h $(sdcc_includedir)/hc08 ; \ + fi + rm -rf `find $(sdcc_includedir) -type d -name '.svn'` # Deleting all the installed files # -------------------------------- uninstall: - for hdr in *.h; do rm -f $(sdcc_datadir)/$$hdr; done + rm -rf $(sdcc_includedir) # Performing self-test @@ -60,7 +78,12 @@ installcheck: # Creating installation directories # --------------------------------- installdirs: - [ -d $(sdcc_datadir)/include ] || mkdir -p $(sdcc_datadir)/include + [ -d $(sdcc_includedir) ] || mkdir -p $(sdcc_includedir) + [ -d $(sdcc_includedir)/mcs51 ] || mkdir -p $(sdcc_includedir)/mcs51 + [ -d $(sdcc_includedir)/pic ] || mkdir -p $(sdcc_includedir)/pic + [ -d $(sdcc_includedir)/pic16 ] || mkdir -p $(sdcc_includedir)/pic16 + [ -d $(sdcc_includedir)/z80 ] || mkdir -p $(sdcc_includedir)/z80 + [ -d $(sdcc_includedir)/hc08 ] || mkdir -p $(sdcc_includedir)/hc08 # Creating dependencies