X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=3ac08c4cbabacf101fb8cf8bea9dd64345455126;hb=37ac4ab4b983a5764f76d7fd77f6658924da8be0;hp=c8ffe69924c853f7c8f0aff253546d35e6d7e6d6;hpb=6b04286e94f4ad9b5ad8e316525a13f06c3c2b43;p=sdk diff --git a/Makefile b/Makefile index c8ffe69..3ac08c4 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ ifneq ($(V),1) .SILENT: endif +_CF_DIR = + include crossplatform.mk include default.cf @@ -115,7 +117,7 @@ export DOCDIR=$(DESTDIR)$(prefix)/share/ecere/doc endif ifndef MANDIR -export MANDIR=$(DESTDIR)$(prefix)/share/man/ +export MANDIR=$(DESTDIR)$(prefix)/share/man endif ifndef BINDIR @@ -181,18 +183,18 @@ ifdef CROSS_TARGET endif bootstrap: outputdirs - cd compiler && $(MAKE) $(XBOOT) bootstrap + +cd compiler && $(_MAKE) $(XBOOT) bootstrap deps: ifdef CROSS_TARGET ifndef LINUX_HOST @$(call echo,Building dependencies (host)...) - cd deps && $(MAKE) $(XBOOT) + +cd deps && $(_MAKE) $(XBOOT) endif endif ifndef LINUX_TARGET @$(call echo,Building dependencies...) - cd deps && $(MAKE) + +cd deps && $(_MAKE) endif ecere: bootstrap deps @@ -201,41 +203,41 @@ ifdef CROSS_TARGET else @$(call echo,Building 2nd stage ecere...) endif - cd ecere && $(MAKE) nores $(XBOOT) - cd ear && $(MAKE) nores $(XBOOT) - cd ecere && $(MAKE) cleaneceretarget + +cd ecere && $(_MAKE) nores $(XBOOT) + +cd ear && $(_MAKE) nores $(XBOOT) + +cd ecere && $(_MAKE) cleaneceretarget ifdef CROSS_TARGET @$(call echo,Building 2nd stage ecere...) endif - cd ecere && $(MAKE) + +cd ecere && $(_MAKE) ecerecom: bootstrap ifdef CROSS_TARGET @$(call echo,Building eC Core Runtime (host)...) - cd ecere && $(MAKE) -f Makefile.ecereCOM $(XBOOT) + +cd ecere && $(_MAKE) -f Makefile.ecereCOM $(XBOOT) endif @$(call echo,Building eC Core Runtime...) - cd ecere && $(MAKE) -f Makefile.ecereCOM + +cd ecere && $(_MAKE) -f Makefile.ecereCOM ecerevanilla: bootstrap @$(call echo,Building Vanilla Ecere...) - cd ecere && $(MAKE) -f Makefile.vanilla + +cd ecere && $(_MAKE) -f Makefile.vanilla ear: ecere ecerevanilla @$(call echo,Building ear...) - cd ear && cd cmd && $(MAKE) cleantarget - cd ear && $(MAKE) + +cd ear && cd cmd && $(_MAKE) cleantarget + +cd ear && $(_MAKE) fixprecompile: - cd compiler && $(MAKE) fixprecompile + +cd compiler && $(_MAKE) fixprecompile compiler: ecere ear ifdef CROSS_TARGET @$(call echo,Building 2nd stage compiler (host)) - cd compiler && $(MAKE) $(XBOOT) + +cd compiler && $(_MAKE) $(XBOOT) endif @$(call echo,Building 2nd stage compiler) - cd compiler && $(MAKE) + +cd compiler && $(_MAKE) prepbinaries: compiler ecerecom @$(call echo,Enabling 2nd stage binaries...) @@ -301,26 +303,26 @@ endif epj2make: prepbinaries @$(call echo,Building epj2make...) - cd epj2make && $(MAKE) + +cd epj2make && $(_MAKE) ecereaudio: prepbinaries ifneq ($(ECERE_AUDIO),n) @$(call echo,Building EcereAudio...) - cd audio && $(MAKE) + +cd audio && $(_MAKE) endif ide: prepbinaries @$(call echo,Building IDE...) - cd ide && $(MAKE) + +cd ide && $(_MAKE) documentor: prepbinaries @$(call echo,Building Documentor...) - cd documentor && $(MAKE) + +cd documentor && $(_MAKE) codeguard: prepcodeguard ifdef CodeGuard @$(call echo,Building CodeGuard client...) - cd codeGuard && $(MAKE) + +cd codeGuard && $(_MAKE) endif prepcodeguard: eda @@ -345,10 +347,10 @@ endif eda: prepbinaries ifdef CROSS_TARGET @$(call echo,Building EDA (host)) - cd eda && $(MAKE) $(XBOOT) + +cd eda && $(_MAKE) $(XBOOT) endif @$(call echo,Building EDA...) - cd eda && $(MAKE) + +cd eda && $(_MAKE) emptyoutput: outputdirs $(call rm,$(OBJLIBDIR)libecereVanilla$(A)) @@ -392,100 +394,88 @@ endif $(call rm,$(OBJBINDIR)ecp$(E)) $(call rm,$(OBJBINDIR)ecs$(E)) $(call rm,$(OBJBINDIR)epj2make$(E)) - $(call rm,$(OBJBINDIR)ide$(E)) + $(call rm,$(OBJBINDIR)ecere-ide$(E)) $(call rm,$(OBJBINDIR)documentor$(E)) ifdef CodeGuard $(call rm,$(OBJBINDIR)CodeGuard$(E)) endif cleantarget: - cd compiler && $(MAKE) cleantarget - cd documentor && $(MAKE) cleantarget - cd ear && $(MAKE) cleantarget - cd ecere && $(MAKE) cleantarget - cd eda && $(MAKE) cleantarget - cd epj2make && $(MAKE) cleantarget - cd ide && $(MAKE) cleantarget - cd installer && $(MAKE) cleantarget + +cd compiler && $(_MAKE) cleantarget + +cd documentor && $(_MAKE) cleantarget + +cd ear && $(_MAKE) cleantarget + +cd ecere && $(_MAKE) cleantarget + +cd eda && $(_MAKE) cleantarget + +cd epj2make && $(_MAKE) cleantarget + +cd ide && $(_MAKE) cleantarget + +cd installer && $(_MAKE) cleantarget ifneq ($(ECERE_AUDIO),n) - cd audio && $(MAKE) cleantarget + +cd audio && $(_MAKE) cleantarget endif pots: cleantarget - $(MAKE) OUTPUT_POT=1 - cd installer && $(MAKE) OUTPUT_POT=1 pots + $(_MAKE) OUTPUT_POT=1 + +cd installer && $(_MAKE) OUTPUT_POT=1 pots ifdef WINDOWS_TARGET installer: - $(MAKE) prepinstall ARCH= - $(MAKE) prepinstall ARCH=x32 + $(_MAKE) prepinstall ARCH= + $(_MAKE) prepinstall ARCH=x32 @$(call echo,Building Ecere runtime for installer...) - cd ecere && @$(MAKE) -f Makefile.installer ARCH=x32 + +cd ecere && @$(_MAKE) -f Makefile.installer ARCH=x32 @$(call echo,Building Installer for Windows...) - cd installer && @$(MAKE) ARCH=x32 + +cd installer && @$(_MAKE) ARCH=x32 @$(call echo,The Ecere SDK Windows Installer is fully built.) endif clean: emptyoutput ifndef LINUX_TARGET - cd deps && $(MAKE) clean -endif - cd ecere && $(MAKE) clean - cd compiler && $(MAKE) clean - cd ear && $(MAKE) clean - cd epj2make && $(MAKE) clean - cd ide && $(MAKE) clean - cd documentor && $(MAKE) clean + +cd deps && $(_MAKE) clean +endif + +cd ecere && $(_MAKE) clean + +cd compiler && $(_MAKE) clean + +cd ear && $(_MAKE) clean + +cd epj2make && $(_MAKE) clean + +cd ide && $(_MAKE) clean + +cd documentor && $(_MAKE) clean ifneq ($(ECERE_AUDIO),n) - cd audio && $(MAKE) clean + +cd audio && $(_MAKE) clean endif ifdef CodeGuard - cd codeGuard && $(MAKE) clean + +cd codeGuard && $(_MAKE) clean endif - cd eda && $(MAKE) clean + +cd eda && $(_MAKE) clean @$(call echo,Done.) realclean: outputdirs ifndef LINUX_TARGET - cd deps && $(MAKE) realclean -endif - cd ecere && $(MAKE) realclean - cd compiler && $(MAKE) realclean - cd ear && $(MAKE) realclean - cd epj2make && $(MAKE) realclean - cd ide && $(MAKE) realclean - cd documentor && $(MAKE) realclean + +cd deps && $(_MAKE) realclean +endif + +cd ecere && $(_MAKE) realclean + +cd compiler && $(_MAKE) realclean + +cd ear && $(_MAKE) realclean + +cd epj2make && $(_MAKE) realclean + +cd ide && $(_MAKE) realclean + +cd documentor && $(_MAKE) realclean ifneq ($(ECERE_AUDIO),n) - cd audio && $(MAKE) realclean + +cd audio && $(_MAKE) realclean endif ifdef CodeGuard - cd codeGuard && $(MAKE) realclean + +cd codeGuard && $(_MAKE) realclean endif - cd eda && $(MAKE) realclean + +cd eda && $(_MAKE) realclean $(call rmr,obj/$(PLATFORM)/) @$(call echo,Done.) -distclean: outputdirs -ifndef LINUX_TARGET - cd deps && $(MAKE) distclean -endif - cd ecere && $(MAKE) distclean - cd compiler && $(MAKE) distclean - cd ear && $(MAKE) distclean - cd epj2make && $(MAKE) distclean - cd ide && $(MAKE) distclean - cd documentor && $(MAKE) distclean -ifneq ($(ECERE_AUDIO),n) - cd audio && $(MAKE) distclean -endif -ifdef CodeGuard - cd codeGuard && $(MAKE) distclean -endif - cd eda && $(MAKE) distclean - $(call rmr,obj/) +distclean: + $(MAKE) -f Cleanfile distclean distclean_all_subdirs @$(call echo,Done.) -DOC = doc/ecere.eCdoc doc/ecereCOM.eCdoc doc/EDA.eCdoc +DOC = doc + +Makefile: ; +crossplatform.mk: ; +default.cf: ; BINARIES = \ ecere/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/$(LP)ecere$(SOV) \ @@ -498,7 +488,7 @@ BINARIES = \ ear/cmd/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/ear$(E) \ epj2make/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/epj2make$(E) \ documentor/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/documentor$(E) \ - ide/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/ide$(E) \ + ide/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/ecere-ide$(E) \ eda/libeda/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/$(LP)EDA$(SOV) \ eda/drivers/sqlite/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/$(LP)EDASQLite$(SOV) @@ -585,7 +575,7 @@ endif endif endif - $(call cp,ide/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/ide$(E),$(OBJBINDIR)) + $(call cp,ide/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/ecere-ide$(E),$(OBJBINDIR)) $(call cp,ear/cmd/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/ear$(E),$(OBJBINDIR)) $(call cp,compiler/ecc/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/ecc$(E),$(OBJBINDIR)) $(call cp,compiler/ecp/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/ecp$(E),$(OBJBINDIR)) @@ -620,7 +610,7 @@ endif ifneq ($(ECERE_AUDIO),n) $(call cp,$(OBJBINDIR)$(LP)EcereAudio$(SO),"$(DESTLIBDIR)/") endif - $(call cp,$(OBJBINDIR)ide$(E),"$(BINDIR)/") + $(call cp,$(OBJBINDIR)ecere-ide$(E),"$(BINDIR)/") $(call cp,$(OBJBINDIR)ear$(E),"$(BINDIR)/") $(call cp,$(OBJBINDIR)ecc$(E),"$(BINDIR)/") $(call cp,$(OBJBINDIR)ecp$(E),"$(BINDIR)/") @@ -632,9 +622,9 @@ ifdef CodeGuard endif $(call cp,$(OBJLIBDIR)libecereVanilla$(A),"$(DESTSLIBDIR)/") $(call cp,doc/tao.pdf,"$(DOCDIR)/Ecere Tao of Programming [work in progress].pdf") || echo "The Ecere Tao of Programming is available at http://ecere.com/tao.pdf" - $(call cp,doc/ecere.eCdoc,"$(DOCDIR)/") - $(call cp,doc/ecereCOM.eCdoc,"$(DOCDIR)/") - $(call cp,doc/EDA.eCdoc,"$(DOCDIR)/") + $(call cpr,$(DOC)/ecereCOM,"$(DOCDIR)/ecereCOM") + $(call cpr,$(DOC)/ecere,"$(DOCDIR)/ecere") + $(call cpr,$(DOC)/EDA,"$(DOCDIR)/EDA") endif ifdef OSX_TARGET @@ -649,7 +639,7 @@ endif ifneq ($(ECERE_AUDIO),n) install $(OBJLIBDIR)$(LP)EcereAudio$(SO) $(DESTLIBDIR)/ endif - install $(OBJBINDIR)ide$(E) $(BINDIR)/ + install $(OBJBINDIR)ecere-ide$(E) $(BINDIR)/ install $(OBJBINDIR)ear$(E) $(BINDIR)/ install $(OBJBINDIR)ecc$(E) $(BINDIR)/ install $(OBJBINDIR)ecp$(E) $(BINDIR)/ @@ -662,16 +652,18 @@ endif install $(OBJLIBDIR)libecereVanilla$(A) $(DESTSLIBDIR)/ install -d $(DOCDIR)/ install doc/tao.pdf $(DOCDIR)/"Ecere Tao of Programming [work in progress].pdf" >/dev/null 2>&1 || echo "The Ecere Tao of Programming is available at http://ecere.com/tao.pdf" - install doc/ecere.eCdoc $(DOCDIR)/ - install doc/ecereCOM.eCdoc $(DOCDIR)/ - install doc/EDA.eCdoc $(DOCDIR)/ + $(call cpr,$(DOC)/ecereCOM,"$(DOCDIR)/ecereCOM") + $(call cpr,$(DOC)/ecere,"$(DOCDIR)/ecere") + $(call cpr,$(DOC)/EDA,"$(DOCDIR)/EDA") mkdir -p $(MANDIR)/man1 - cp -pRf share/man/man1/* $(MANDIR)/man1 + $(call cpr,share/man/man1,$(MANDIR)/man1) mkdir -p $(SAMPLESDIR) - cp -pRf samples/* $(SAMPLESDIR) + $(call cpr,samples,$(SAMPLESDIR)) find $(SAMPLESDIR) -type d -exec chmod 777 {} \; + find $(DOCDIR) -type d -exec chmod 755 {} \; + find $(DOCDIR) -type f -exec chmod 644 {} \; mkdir -p $(EXTRASDIR) - cp -pRf extras/* $(EXTRASDIR) + $(call cpr,extras,$(EXTRASDIR)) endif ifndef OSX_TARGET @@ -721,7 +713,7 @@ else install $(INSTALL_FLAGS) $(OBJLIBDIR)$(LP)ecere$(SO) $(DESTLIBDIR)/$(LP)ecere$(SO) install $(INSTALL_FLAGS) $(OBJLIBDIR)$(LP)ecereCOM$(SO) $(DESTLIBDIR)/$(LP)ecereCOM$(SO) endif - install $(INSTALL_FLAGS) $(OBJBINDIR)ide$(E) $(BINDIR)/ide$(E) + install $(INSTALL_FLAGS) $(OBJBINDIR)ecere-ide$(E) $(BINDIR)/ecere-ide$(E) install $(INSTALL_FLAGS) $(OBJBINDIR)ear$(E) $(BINDIR)/ear$(E) install $(INSTALL_FLAGS) $(OBJBINDIR)ecc$(E) $(BINDIR)/ecc$(E) install $(INSTALL_FLAGS) $(OBJBINDIR)ecp$(E) $(BINDIR)/ecp$(E) @@ -735,16 +727,17 @@ endif ifdef BSD_HOST install $(INSTALL_FLAGS) -d $(DOCDIR) endif - install $(INSTALL_FLAGS) -m 644 doc/EDA.eCdoc $(DOCDIR)/EDA.eCdoc install $(INSTALL_FLAGS) -m 644 doc/tao.pdf $(DOCDIR)/"Ecere Tao of Programming [work in progress].pdf" >/dev/null 2>&1 || echo "The Ecere Tao of Programming is available at http://ecere.com/tao.pdf" - install $(INSTALL_FLAGS) -m 644 doc/ecere.eCdoc $(DOCDIR)/ecere.eCdoc - install $(INSTALL_FLAGS) -m 644 doc/ecereCOM.eCdoc $(DOCDIR)/ecereCOM.eCdoc - install $(INSTALL_FLAGS) -m 644 doc/EDA.eCdoc $(DOCDIR)/EDA.eCdoc + $(call cpr,$(DOC)/ecereCOM,"$(DOCDIR)/ecereCOM") + $(call cpr,$(DOC)/ecere,"$(DOCDIR)/ecere") + $(call cpr,$(DOC)/EDA,"$(DOCDIR)/EDA") mkdir -p $(MANDIR)/man1 cp -pRf share/man/man1/* $(MANDIR)/man1 mkdir -p $(SAMPLESDIR) cp -pRf samples/* $(SAMPLESDIR) find $(SAMPLESDIR) -type d -exec chmod 777 {} \; + find $(DOCDIR) -type d -exec chmod 755 {} \; + find $(DOCDIR) -type f -exec chmod 644 {} \; mkdir -p $(EXTRASDIR) cp $(CPFLAGS) extras/* $(EXTRASDIR) ifdef DEBIAN_PACKAGE @@ -795,7 +788,7 @@ ifneq ($(ECERE_AUDIO),n) $(call rm,"$(DESTLIBDIR)/$(LP)EcereAudio$(SO)") endif endif - $(call rm,"$(BINDIR)/ide$(E)") + $(call rm,"$(BINDIR)/ecere-ide$(E)") $(call rm,"$(BINDIR)/ear$(E)") $(call rm,"$(BINDIR)/ecc$(E)") $(call rm,"$(BINDIR)/ecp$(E)") @@ -810,6 +803,9 @@ endif $(call rm,"$(DOCDIR)/ecere.eCdoc") $(call rm,"$(DOCDIR)/ecereCOM.eCdoc") $(call rm,"$(DOCDIR)/EDA.eCdoc") + $(call rmr,"$(DOCDIR)/ecere") + $(call rmr,"$(DOCDIR)/ecereCOM") + $(call rmr,"$(DOCDIR)/EDA") ifdef LINUX_TARGET $(call rm,"$(DESTLIBDIR)/$(LP)ecere$(SO).0") $(call rm,"$(DESTLIBDIR)/$(LP)ecereCOM$(SO).0") @@ -857,28 +853,28 @@ updatebootstrap: regenbootstrap update_ecere: @echo Regenerating ecere bootstrapper... - cd ecere && $(MAKE) -f Makefile.bootstrap clean - cd ecere && $(MAKE) -f Makefile.bootstrap + +cd ecere && $(_MAKE) -f Makefile.bootstrap clean + +cd ecere && $(_MAKE) -f Makefile.bootstrap update_libec: @echo Regenerating ec bootstrapper... - cd compiler/libec && $(MAKE) -f Makefile.bootstrap clean - cd compiler/libec && $(MAKE) -f Makefile.bootstrap + +cd compiler/libec && $(_MAKE) -f Makefile.bootstrap clean + +cd compiler/libec && $(_MAKE) -f Makefile.bootstrap update_ecp: @echo Regenerating ecp bootstrapper... - cd compiler/ecp && $(MAKE) -f Makefile.bootstrap clean - cd compiler/ecp && $(MAKE) -f Makefile.bootstrap + +cd compiler/ecp && $(_MAKE) -f Makefile.bootstrap clean + +cd compiler/ecp && $(_MAKE) -f Makefile.bootstrap update_ecc: @echo Regenerating ecc bootstrapper... - cd compiler/ecc && $(MAKE) -f Makefile.bootstrap clean - cd compiler/ecc && $(MAKE) -f Makefile.bootstrap + +cd compiler/ecc && $(_MAKE) -f Makefile.bootstrap clean + +cd compiler/ecc && $(_MAKE) -f Makefile.bootstrap update_ecs: @echo Regenerating ecs bootstrapper... - cd compiler/ecs && $(MAKE) -f Makefile.bootstrap clean - cd compiler/ecs && $(MAKE) -f Makefile.bootstrap + +cd compiler/ecs && $(_MAKE) -f Makefile.bootstrap clean + +cd compiler/ecs && $(_MAKE) -f Makefile.bootstrap troubleshoot: @$(call echo,Printing values of some variables.) @@ -894,6 +890,13 @@ troubleshoot: @$(call echo,WINDOWS_TARGET=$(WINDOWS_TARGET)) @$(call echo,BSD_HOST=$(BSD_HOST)) @$(call echo,BSD_TARGET=$(BSD_TARGET)) + @$(call echo,OS=$(OS)) + @$(call echo,OSTYPE=$(OSTYPE)) + @$(call echo,BASH=$(BASH)) + @$(call echo,TERM=$(TERM)) + @$(call echo,SHELL=$(SHELL)) + @$(call echo,WIN_SHELL_COMMANDS=$(WIN_SHELL_COMMANDS)) + @$(call echo,WIN_PS_TOOLS=$(WIN_PS_TOOLS)) @$(call echo,CCACHE=$(CCACHE)) @$(call echo,CCACHE_COMPILE=$(CCACHE_COMPILE)) @$(call echo,CCACHE_PREFIX=$(CCACHE_PREFIX)) @@ -919,3 +922,7 @@ troubleshoot: @$(call echo,DIR_VER=$(DIR_VER)) @$(call echo,REPOSITORY_VER=$(REPOSITORY_VER)) @$(call echo,CPPFLAGS=$(CPPFLAGS)) + @$(call echo,OPENSSL_CONF=$(OPENSSL_CONF)) + @$(call echo,OPENSSL_INCLUDE_DIR=$(OPENSSL_INCLUDE_DIR)) + @$(call echo,OPENSSL_LIB_DIR=$(OPENSSL_LIB_DIR)) + @$(call echo,OPENSSL_BIN_DIR=$(OPENSSL_BIN_DIR))