6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
18 exec_prefix = @exec_prefix@
22 includedir = @includedir@
24 man1dir = $(mandir)/man1
25 man2dir = $(mandir)/man2
29 include_dir_suffix = @include_dir_suffix@
31 sdcc_includedir = $(DESTDIR)$(datadir)/$(include_dir_suffix)
33 CPPFLAGS = @CPPFLAGS@ -I$(PRJDIR)
36 # Compiling entire program or any subproject
37 # ------------------------------------------
40 # Compiling and installing everything and running test
41 # ----------------------------------------------------
42 install: all installdirs
43 $(CP) -r asm *.h $(sdcc_includedir)
44 if [ "`grep mcs51 ../../ports.build`" = mcs51 ]; then \
45 $(CP) mcs51/*.h $(sdcc_includedir)/mcs51 ; \
47 if [ "`grep pic16 ../../ports.build`" = pic16 ]; then \
48 $(CP) pic16/*.h $(sdcc_includedir)/pic16 ; \
50 if [ "`grep z80 ../../ports.build`" = z80 ]; then \
51 $(CP) z80/*.h $(sdcc_includedir)/z80 ; \
53 rm -rf `find $(sdcc_includedir) -type d -name 'CVS'`
56 # Deleting all the installed files
57 # --------------------------------
59 rm -rf $(sdcc_includedir)
62 # Performing self-test
63 # --------------------
67 # Performing installation test
68 # ----------------------------
72 # Creating installation directories
73 # ---------------------------------
75 [ -d $(sdcc_includedir) ] || mkdir -p $(sdcc_includedir)
76 [ -d $(sdcc_includedir)/mcs51 ] || mkdir -p $(sdcc_includedir)/mcs51
77 [ -d $(sdcc_includedir)/pic16 ] || mkdir -p $(sdcc_includedir)/pic16
78 [ -d $(sdcc_includedir)/z80 ] || mkdir -p $(sdcc_includedir)/z80
81 # Creating dependencies
82 # ---------------------
86 # $(CPP) $(CPPFLAGS) $(M_OR_MM) *.c >main.dep
95 # Remaking configuration
96 # ----------------------
98 @if [ -f $(PRJDIR)/devel ]; then\
99 $(MAKE) -f $(srcdir)/conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" \
103 # End of main_in.mk/main.mk