ecere/gui/Window: Always flashing window rather than activating if app is inactive
[sdk] / Makefile
index bc3478a..d905252 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
-.PHONY: all clean realclean distclean emptyoutput prepinstall actualinstall install copyonlyinstall uninstall troubleshoot outputdirs bootstrap deps ecere ecerecom ecerevanilla ear compiler prepbinaries epj2make ide documentor eda prepcodeguard codeguard
+.PHONY: all clean realclean distclean emptyoutput prepinstall actualinstall install copyonlyinstall uninstall troubleshoot outputdirs bootstrap deps ecere ecerecom ecerevanilla ear compiler prepbinaries epj2make ide documentor eda prepcodeguard codeguard fixprecompile cleantarget pots installer regenbootstrap updatebootstrap update_ecere update_libec update_ecp update_ecc update_ecs
+ifneq "$V" "1"
 .SILENT:
+endif
 
 include crossplatform.mk
 include default.cf
@@ -124,7 +126,7 @@ else
 endif
 
 export CPPFLAGS
-CPPFLAGS += -DDEB_HOST_MULTIARCH=\"$(PREFIXLIBDIR)\"
+CPPFLAGS += -DDEB_HOST_MULTIARCH=\"$(call escspace,$(PREFIXLIBDIR))\"
 
 DESTLIBDIR := $(DESTDIR)$(PREFIXLIBDIR)
 ifdef SLIBDIR
@@ -169,11 +171,15 @@ bootstrap: outputdirs
 
 deps:
 ifdef CROSS_TARGET
+ifndef LINUX_HOST
        @$(call echo,Building dependencies (host)...)
        cd deps && $(MAKE) $(XBOOT)
 endif
+endif
+ifndef LINUX_TARGET
        @$(call echo,Building dependencies...)
        cd deps && $(MAKE)
+endif
 
 ecere: bootstrap deps
 ifdef CROSS_TARGET
@@ -206,6 +212,9 @@ ear: ecere ecerevanilla
        cd ear && cd cmd && $(MAKE) cleantarget
        cd ear && $(MAKE)
 
+fixprecompile:
+       cd compiler && $(MAKE) fixprecompile
+
 compiler: ecere ear
 ifdef CROSS_TARGET
        @$(call echo,Building 2nd stage compiler (host))
@@ -314,6 +323,10 @@ endif
 endif
 
 eda: prepbinaries
+ifdef CROSS_TARGET
+       @$(call echo,Building EDA (host))
+       cd eda && $(MAKE) $(XBOOT)
+endif
        @$(call echo,Building EDA...)
        cd eda && $(MAKE)
 
@@ -356,8 +369,35 @@ ifdef EDASQLiteCipher
        $(call rmq,$(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
+
+pots: cleantarget
+       $(MAKE) OUTPUT_POT=1
+       cd installer && $(MAKE) OUTPUT_POT=1 pots
+
+ifdef WINDOWS_TARGET
+installer:
+       $(MAKE) prepinstall ARCH=
+       $(MAKE) prepinstall ARCH=x32
+       @$(call echo,Building Ecere runtime for installer...)
+       cd ecere && @$(MAKE) -f Makefile.installer ARCH=x32
+       @$(call echo,Building Installer for Windows...)
+       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
@@ -371,7 +411,9 @@ endif
        @$(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
@@ -386,7 +428,9 @@ endif
        @$(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
@@ -714,6 +758,43 @@ ifdef WINDOWS_TARGET
 endif
        @$(call echo,The Ecere SDK has been uninstalled.)
 
+regenbootstrap: update_ecere update_libec update_ecp update_ecc update_ecs
+       @echo Bootstrap regenerated.
+
+updatebootstrap: regenbootstrap
+       @echo Copying files...
+       $(call cpq,ecere/obj/bootstrap.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/*.c,compiler/bootstrap/ecere/bootstrap)
+       $(call cpq,compiler/libec/obj/bootstrap.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/*.c,compiler/bootstrap/libec/bootstrap)
+       $(call cpq,compiler/ecp/obj/bootstrap.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/*.c,compiler/bootstrap/ecp/bootstrap)
+       $(call cpq,compiler/ecc/obj/bootstrap.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/*.c,compiler/bootstrap/ecc/bootstrap)
+       $(call cpq,compiler/ecs/obj/bootstrap.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/*.c,compiler/bootstrap/ecs/bootstrap)
+       @echo Bootstrap updated.
+
+update_ecere:
+       @echo Regenerating ecere bootstrapper...
+       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
+
+update_ecp:
+       @echo Regenerating ecp bootstrapper...
+       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
+
+update_ecs:
+       @echo Regenerating ecs bootstrapper...
+       cd compiler/ecs && $(MAKE) -f Makefile.bootstrap clean
+       cd compiler/ecs && $(MAKE) -f Makefile.bootstrap
+
 troubleshoot:
        @$(call echo,Printing values of some variables.)
        @$(call echo,HOST_PLATFORM=$(HOST_PLATFORM))
@@ -748,3 +829,7 @@ troubleshoot:
        @$(call echo,PREFIXLIBDIR=$(PREFIXLIBDIR))
        @$(call echo,ARCH=$(ARCH))
        @$(call echo,ARCH_FLAGS=$(ARCH_FLAGS))
+       @$(call echo,GIT_REPOSITORY=$(GIT_REPOSITORY))
+       @$(call echo,DIR_VER=$(DIR_VER))
+       @$(call echo,REPOSITORY_VER=$(REPOSITORY_VER))
+       @$(call echo,CPPFLAGS=$(CPPFLAGS))