aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/buildsys
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/flext/buildsys')
-rw-r--r--externals/grill/flext/buildsys/bmake.inc35
-rw-r--r--externals/grill/flext/buildsys/build-gcc.sh1
-rw-r--r--externals/grill/flext/buildsys/gnumake.inc37
-rw-r--r--externals/grill/flext/buildsys/gnumake.mak4
-rw-r--r--externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc2
-rw-r--r--externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc2
-rw-r--r--externals/grill/flext/buildsys/lnx/gnumake-gcc.inc12
-rw-r--r--externals/grill/flext/buildsys/mac/gnumake-gcc.inc5
-rw-r--r--externals/grill/flext/buildsys/nmake.inc35
-rw-r--r--externals/grill/flext/buildsys/readme.txt3
-rw-r--r--externals/grill/flext/buildsys/targets-ext.inc2
-rw-r--r--externals/grill/flext/buildsys/targets-flext.inc2
-rw-r--r--externals/grill/flext/buildsys/targets.inc35
-rw-r--r--externals/grill/flext/buildsys/win/bmake-bcc.inc6
-rw-r--r--externals/grill/flext/buildsys/win/gnumake-cygwin.inc10
-rw-r--r--externals/grill/flext/buildsys/win/gnumake-mingw.inc10
-rw-r--r--externals/grill/flext/buildsys/win/nmake-msvc.inc4
17 files changed, 128 insertions, 77 deletions
diff --git a/externals/grill/flext/buildsys/bmake.inc b/externals/grill/flext/buildsys/bmake.inc
index bdd99818..401c8006 100644
--- a/externals/grill/flext/buildsys/bmake.inc
+++ b/externals/grill/flext/buildsys/bmake.inc
@@ -2,6 +2,15 @@
# flext defines
##############################################
+CFLAGS=$(CFLAGS) $(UFLAGS)
+
+!ifdef DEBUG
+CFLAGS=$(CFLAGS) /D_DEBUG $(DFLAGS)
+!else
+CFLAGS=$(CFLAGS) /DNDEBUG $(OFLAGS)
+!endif
+
+
!ifdef SHARED
# --- shared ---
DEFS=$(DEFS) /DFLEXT_SHARED
@@ -22,30 +31,26 @@ DEFS=$(DEFS) /DFLEXT_THREADS
##############################################
!ifdef SHARED
-
-!ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_d
+TYPEEXT=_
!else
-FLEXTNAME=flext-$(RTSYS)
-!endif
-
-!else
-
!ifdef THREADED
-!ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_td
+TYPEEXT=_t
!else
-FLEXTNAME=flext-$(RTSYS)_t
+TYPEEXT=_s
!endif
-!else
+!endif
+
!ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_sd
+MODEEXT=d
+!else
+!ifdef PROFILE
+MODEEXT=p
!else
-FLEXTNAME=flext-$(RTSYS)_s
+MODEEXT=
!endif
!endif
-!endif # SHARED
+FLEXTNAME=flext-$(RTSYS)$(TYPEEXT)$(MODEEXT)
##############################################
# product name and folder
diff --git a/externals/grill/flext/buildsys/build-gcc.sh b/externals/grill/flext/buildsys/build-gcc.sh
index f8575c99..ab4b5570 100644
--- a/externals/grill/flext/buildsys/build-gcc.sh
+++ b/externals/grill/flext/buildsys/build-gcc.sh
@@ -3,4 +3,3 @@
build=${0%/*}/
make -f ${build}gnumake.mak PLATFORM=$1 RTSYS=$2 COMPILER=gcc BUILDPATH=${build} $3 $4 $5 $6 $7 $8 $9
-
diff --git a/externals/grill/flext/buildsys/gnumake.inc b/externals/grill/flext/buildsys/gnumake.inc
index 31553e17..0db24110 100644
--- a/externals/grill/flext/buildsys/gnumake.inc
+++ b/externals/grill/flext/buildsys/gnumake.inc
@@ -1,7 +1,16 @@
##############################################
-# flext defines
+# some compiler definitions
##############################################
+CFLAGS += $(UFLAGS)
+
+ifdef DEBUG
+CFLAGS += -D_DEBUG $(DFLAGS)
+else
+CFLAGS += -DNDEBUG $(OFLAGS)
+endif
+
+
ifdef SHARED
# --- shared ---
DEFS+=-DFLEXT_SHARED
@@ -22,30 +31,26 @@ endif
##############################################
ifdef SHARED
-
-ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_d
+TYPEEXT=_
else
-FLEXTNAME=flext-$(RTSYS)
-endif
-
-else
-
ifdef THREADED
-ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_td
+TYPEEXT=_t
else
-FLEXTNAME=flext-$(RTSYS)_t
+TYPEEXT=_s
endif
-else
+endif
+
ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_sd
+MODEEXT=d
+else
+ifdef PROFILE
+MODEEXT=p
else
-FLEXTNAME=flext-$(RTSYS)_s
+MODEEXT=
endif
endif
-endif # SHARED
+FLEXTNAME=flext-$(RTSYS)$(TYPEEXT)$(MODEEXT)
##############################################
# product name and folder
diff --git a/externals/grill/flext/buildsys/gnumake.mak b/externals/grill/flext/buildsys/gnumake.mak
index 92ee6f76..4f9ca055 100644
--- a/externals/grill/flext/buildsys/gnumake.mak
+++ b/externals/grill/flext/buildsys/gnumake.mak
@@ -73,13 +73,15 @@ endif
###############################################
# include file describing default target dependencies
+.PHONY : all build clean install profile
+
include $(BUILDPATH)targets.inc
include $(BUILDPATH)targets-$(BUILDCLASS).inc
###############################################
-.precious: $(SYSCONFIG) $(USRCONFIG)
+.PRECIOUS: $(SYSCONFIG) $(USRCONFIG)
$(SYSCONFIG): $(SYSDEFAULT)
@cp $< $@
diff --git a/externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc
index e2c15730..1e2d61d3 100644
--- a/externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc
+++ b/externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc
@@ -31,7 +31,7 @@ $(TARGET):: $(COBJS) $(CPPOBJS)
##############################################
_clean_:
- rm $(COBJS) $(CPPOBJS) $(TARGET)
+ -rm -r $(TARGETPATH)
##############################################
diff --git a/externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc b/externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc
index ec55d6b8..ae9b4a48 100644
--- a/externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc
+++ b/externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc
@@ -31,7 +31,7 @@ endif
##############################################
_clean_:
- rm $(COBJS) $(CPPOBJS) $(TARGET)
+ -rm -r $(TARGETPATH)
##############################################
diff --git a/externals/grill/flext/buildsys/lnx/gnumake-gcc.inc b/externals/grill/flext/buildsys/lnx/gnumake-gcc.inc
index 70a4601e..9927fb1a 100644
--- a/externals/grill/flext/buildsys/lnx/gnumake-gcc.inc
+++ b/externals/grill/flext/buildsys/lnx/gnumake-gcc.inc
@@ -7,18 +7,20 @@ TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT)
##############################################
CFLAGS += -pthread
-LDFLAGS += -pthread -shared
+LDFLAGS += -pthread -shared -Wl,-x
##############################################
-CFLAGS += $(UFLAGS)
-
ifdef DEBUG
-CFLAGS += -g -D_DEBUG
+CFLAGS += -g
+else
+ifdef PROFILE
+CFLAGS += -g -pg
+LDFLAGS += -pg
else
-CFLAGS += $(OFLAGS) -DNDEBUG
LDFLAGS += -Wl,-S
endif
+endif
##############################################
diff --git a/externals/grill/flext/buildsys/mac/gnumake-gcc.inc b/externals/grill/flext/buildsys/mac/gnumake-gcc.inc
index ffc9c6ef..1bfe2362 100644
--- a/externals/grill/flext/buildsys/mac/gnumake-gcc.inc
+++ b/externals/grill/flext/buildsys/mac/gnumake-gcc.inc
@@ -4,11 +4,8 @@ LDFLAGS += -dynamic -Wl,-x -framework ApplicationServices -framework vecLib
##############################################
-CFLAGS += $(UFLAGS)
-
ifdef DEBUG
-CFLAGS += -g -D_DEBUG
+CFLAGS += -g
else
-CFLAGS += $(OFLAGS) -DNDEBUG
LDFLAGS += -Wl,-S
endif
diff --git a/externals/grill/flext/buildsys/nmake.inc b/externals/grill/flext/buildsys/nmake.inc
index 3f275b8f..bf86cc34 100644
--- a/externals/grill/flext/buildsys/nmake.inc
+++ b/externals/grill/flext/buildsys/nmake.inc
@@ -2,6 +2,15 @@
# flext defines
##############################################
+CFLAGS=$(CFLAGS) $(UFLAGS)
+
+!ifdef DEBUG
+CFLAGS=$(CFLAGS) /D_DEBUG $(DFLAGS)
+!else
+CFLAGS=$(CFLAGS) /DNDEBUG $(OFLAGS)
+!endif
+
+
!ifdef SHARED
# --- shared ---
DEFS=$(DEFS) /DFLEXT_SHARED
@@ -20,30 +29,26 @@ DEFS=$(DEFS) /DFLEXT_THREADS
##############################################
!ifdef SHARED
-
-!ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_d
+TYPEEXT=_
!else
-FLEXTNAME=flext-$(RTSYS)
-!endif
-
-!else
-
!ifdef THREADED
-!ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_td
+TYPEEXT=_t
!else
-FLEXTNAME=flext-$(RTSYS)_t
+TYPEEXT=_s
!endif
-!else
+!endif
+
!ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_sd
+MODEEXT=d
+!else
+!ifdef PROFILE
+MODEEXT=p
!else
-FLEXTNAME=flext-$(RTSYS)_s
+MODEEXT=
!endif
!endif
-!endif # SHARED
+FLEXTNAME=flext-$(RTSYS)$(TYPEEXT)$(MODEEXT)
##############################################
# product name and folder
diff --git a/externals/grill/flext/buildsys/readme.txt b/externals/grill/flext/buildsys/readme.txt
index e42e860d..434f479e 100644
--- a/externals/grill/flext/buildsys/readme.txt
+++ b/externals/grill/flext/buildsys/readme.txt
@@ -39,7 +39,7 @@ or
clean-MODE-TYPE
with
- MODE: default, all, release, debug
+ MODE: default, all, release, debug, profile
TYPE: default, all, single, multi, shared
@@ -89,6 +89,7 @@ BUILDCLASS: can currently be flext or ext, default is ext.
BUILDMODE: release or debug, default is release
if release, optimization flags will be used
if debug, debug information will be generated
+ if profile, profiling information will be generated (with debug info and optimization)
BUILDTYPE: single, multi or shared, default is single
if single, it will be linked against the single-threaded static flext library
diff --git a/externals/grill/flext/buildsys/targets-ext.inc b/externals/grill/flext/buildsys/targets-ext.inc
index afab3086..bd9d733e 100644
--- a/externals/grill/flext/buildsys/targets-ext.inc
+++ b/externals/grill/flext/buildsys/targets-ext.inc
@@ -6,6 +6,8 @@ build-release-default: build-release-$(BUILDTYPE)
build-debug-default: build-debug-$(BUILDTYPE)
+build-profile-default: build-profile-$(BUILDTYPE)
+
build-default-all: build-$(BUILDMODE)-all
build-default-single: build-$(BUILDMODE)-single
diff --git a/externals/grill/flext/buildsys/targets-flext.inc b/externals/grill/flext/buildsys/targets-flext.inc
index e16f2b86..83772b94 100644
--- a/externals/grill/flext/buildsys/targets-flext.inc
+++ b/externals/grill/flext/buildsys/targets-flext.inc
@@ -6,6 +6,8 @@ build-release-default: build-release-all
build-debug-default: build-debug-all
+build-profile-default: build-profile-all
+
build-default-all: build-all-all
build-default-single: build-all-single
diff --git a/externals/grill/flext/buildsys/targets.inc b/externals/grill/flext/buildsys/targets.inc
index 514ef2fb..a1ab4631 100644
--- a/externals/grill/flext/buildsys/targets.inc
+++ b/externals/grill/flext/buildsys/targets.inc
@@ -2,6 +2,8 @@ all: build
build: build-default-default
+profile: build-profile-default
+
clean: clean-default-default
install: install-default-default
@@ -14,6 +16,8 @@ build-release-all: build-release-single build-release-multi build-release-shared
build-debug-all: build-debug-single build-debug-multi build-debug-shared
+build-profile-all: build-profile-single build-profile-multi build-profile-shared
+
build-all-single: build-release-single build-debug-single
build-all-multi: build-release-multi build-debug-multi
@@ -28,6 +32,8 @@ install-release-all: install-release-single install-release-multi install-releas
install-debug-all: install-debug-single install-debug-multi install-debug-shared
+install-profile-all: install-profile-single install-profile-multi install-profile-shared
+
install-all-single: install-release-single install-debug-single
install-all-multi: install-release-multi install-debug-multi
@@ -42,6 +48,8 @@ clean-release-all: clean-release-single clean-release-multi clean-release-shared
clean-debug-all: clean-debug-single clean-debug-multi clean-debug-shared
+clean-profile-all: clean-profile-single clean-profile-multi clean-profile-shared
+
clean-all-single: clean-release-single clean-debug-single
clean-all-multi: clean-release-multi clean-debug-multi
@@ -56,18 +64,27 @@ build-release-single: config
build-debug-single: config
$(MAKE) $(OPTIONS) TARGETMODE=debug TARGETTYPE=single DEBUG=1 _build_
+build-profile-single: config
+ $(MAKE) $(OPTIONS) TARGETMODE=profile TARGETTYPE=single PROFILE=1 _build_
+
build-release-multi: config
$(MAKE) $(OPTIONS) TARGETMODE=release TARGETTYPE=multi THREADED=1 _build_
build-debug-multi: config
$(MAKE) $(OPTIONS) TARGETMODE=debug TARGETTYPE=multi THREADED=1 DEBUG=1 _build_
+build-profile-multi: config
+ $(MAKE) $(OPTIONS) TARGETMODE=profile TARGETTYPE=multi THREADED=1 PROFILE=1 _build_
+
build-release-shared: config
$(MAKE) $(OPTIONS) TARGETMODE=release TARGETTYPE=shared SHARED=1 _build_
build-debug-shared: config
$(MAKE) $(OPTIONS) TARGETMODE=debug TARGETTYPE=shared SHARED=1 DEBUG=1 _build_
+build-profile-shared: config
+ $(MAKE) $(OPTIONS) TARGETMODE=profile TARGETTYPE=shared SHARED=1 PROFILE=1 _build_
+
###########################################################
install-release-single: config
@@ -76,18 +93,27 @@ install-release-single: config
install-debug-single: config
$(MAKE) $(OPTIONS) TARGETMODE=debug TARGETTYPE=single DEBUG=1 _install_
+install-profile-single: config
+ $(MAKE) $(OPTIONS) TARGETMODE=profile TARGETTYPE=single PROFILE=1 _install_
+
install-release-multi: config
$(MAKE) $(OPTIONS) TARGETMODE=release TARGETTYPE=multi THREADED=1 _install_
install-debug-multi: config
$(MAKE) $(OPTIONS) TARGETMODE=debug TARGETTYPE=multi THREADED=1 DEBUG=1 _install_
+install-profile-multi: config
+ $(MAKE) $(OPTIONS) TARGETMODE=profile TARGETTYPE=multi THREADED=1 PROFILE=1 _install_
+
install-release-shared: config
$(MAKE) $(OPTIONS) TARGETMODE=release TARGETTYPE=shared SHARED=1 _install_
install-debug-shared: config
$(MAKE) $(OPTIONS) TARGETMODE=debug TARGETTYPE=shared SHARED=1 DEBUG=1 _install_
+install-profile-shared: config
+ $(MAKE) $(OPTIONS) TARGETMODE=profile TARGETTYPE=shared SHARED=1 PROFILE=1 _install_
+
###########################################################
clean-release-single: config
@@ -96,18 +122,27 @@ clean-release-single: config
clean-debug-single: config
$(MAKE) $(OPTIONS) TARGETMODE=debug TARGETTYPE=single DEBUG=1 _clean_
+clean-profile-single: config
+ $(MAKE) $(OPTIONS) TARGETMODE=profile TARGETTYPE=single PROFILE=1 _clean_
+
clean-release-multi: config
$(MAKE) $(OPTIONS) TARGETMODE=release TARGETTYPE=multi THREADED=1 _clean_
clean-debug-multi: config
$(MAKE) $(OPTIONS) TARGETMODE=debug TARGETTYPE=multi THREADED=1 DEBUG=1 _clean_
+clean-profile-multi: config
+ $(MAKE) $(OPTIONS) TARGETMODE=profile TARGETTYPE=multi THREADED=1 PROFILE=1 _clean_
+
clean-release-shared: config
$(MAKE) $(OPTIONS) TARGETMODE=release TARGETTYPE=shared SHARED=1 _clean_
clean-debug-shared: config
$(MAKE) $(OPTIONS) TARGETMODE=debug TARGETTYPE=shared SHARED=1 DEBUG=1 _clean_
+clean-profile-shared: config
+ $(MAKE) $(OPTIONS) TARGETMODE=profile TARGETTYPE=shared SHARED=1 PROFILE=1 _clean_
+
###########################################################
config: $(USRMAKE) $(SYSCONFIG) $(USRCONFIG)
diff --git a/externals/grill/flext/buildsys/win/bmake-bcc.inc b/externals/grill/flext/buildsys/win/bmake-bcc.inc
index 131dc61e..6e9e142b 100644
--- a/externals/grill/flext/buildsys/win/bmake-bcc.inc
+++ b/externals/grill/flext/buildsys/win/bmake-bcc.inc
@@ -28,13 +28,9 @@ LDFLAGS=$(LDFLAGS) /C /Tpd
##############################################
-CFLAGS=$(CFLAGS) $(UFLAGS)
-
!ifdef DEBUG
-CFLAGS=$(CFLAGS) -v -D_DEBUG
+CFLAGS=$(CFLAGS) -v
LDFLAGS=$(LDFLAGS) /v
-!else
-CFLAGS=$(CFLAGS) $(OFLAGS) -DNDEBUG
!endif
##############################################
diff --git a/externals/grill/flext/buildsys/win/gnumake-cygwin.inc b/externals/grill/flext/buildsys/win/gnumake-cygwin.inc
index 70a4601e..51866686 100644
--- a/externals/grill/flext/buildsys/win/gnumake-cygwin.inc
+++ b/externals/grill/flext/buildsys/win/gnumake-cygwin.inc
@@ -11,14 +11,16 @@ LDFLAGS += -pthread -shared
##############################################
-CFLAGS += $(UFLAGS)
-
ifdef DEBUG
-CFLAGS += -g -D_DEBUG
+CFLAGS += -g
+else
+ifdef PROFILE
+CFLAGS += -g -pg
+LDFLAGS += -pg
else
-CFLAGS += $(OFLAGS) -DNDEBUG
LDFLAGS += -Wl,-S
endif
+endif
##############################################
diff --git a/externals/grill/flext/buildsys/win/gnumake-mingw.inc b/externals/grill/flext/buildsys/win/gnumake-mingw.inc
index 1bb72d6b..35ffc3a4 100644
--- a/externals/grill/flext/buildsys/win/gnumake-mingw.inc
+++ b/externals/grill/flext/buildsys/win/gnumake-mingw.inc
@@ -11,14 +11,16 @@ LDFLAGS += -pthread -shared
##############################################
-CFLAGS += $(UFLAGS)
-
ifdef DEBUG
-CFLAGS += -g -D_DEBUG
+CFLAGS += -g
+else
+ifdef PROFILE
+CFLAGS += -g -pg
+LDFLAGS += -pg
else
-CFLAGS += $(OFLAGS) -DNDEBUG
LDFLAGS += -Wl,-S
endif
+endif
##############################################
diff --git a/externals/grill/flext/buildsys/win/nmake-msvc.inc b/externals/grill/flext/buildsys/win/nmake-msvc.inc
index b1fe1acc..826e99fb 100644
--- a/externals/grill/flext/buildsys/win/nmake-msvc.inc
+++ b/externals/grill/flext/buildsys/win/nmake-msvc.inc
@@ -30,11 +30,8 @@ LDFLAGS=$(LDFLAGS) /nologo
##############################################
-CFLAGS=$(CFLAGS) $(UFLAGS)
-
!ifdef DEBUG
-CFLAGS=$(CFLAGS) /D_DEBUG
!ifdef DYNAMIC
CFLAGS=$(CFLAGS) /MDd
!else
@@ -45,7 +42,6 @@ LDFLAGS=$(LDFLAGS) /DEBUG
!else
-CFLAGS=$(CFLAGS) $(OFLAGS) /DNDEBUG
!ifdef DYNAMIC
CFLAGS=$(CFLAGS) /MD
!else