.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
.SILENT:
+include crossplatform.mk
include include.mk
LIBVER := .0.44
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
SOV := $(SO)
endif
-else # WINDOWS
+else # WINDOWS_TARGET
SOV := $(SO)$(LIBVER)
prepbinaries: compiler ecerecom
@$(call echo,Enabling 2nd stage binaries...)
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
$(call cpq,ecere/obj/release.$(PLATFORM)/$(LP)ecere$(SOV),$(OBJBINDIR))
$(call cpq,ecere/obj/ecereCOM.release.$(PLATFORM)/$(LP)ecereCOM$(SOV),$(OBJBINDIR))
$(call cpq,compiler/libec/obj/release.$(PLATFORM)/$(LP)ec$(SOV),$(OBJBINDIR))
endif
-ifdef LINUX
+ifdef LINUX_TARGET
$(call cpq,ecere/obj/release.$(PLATFORM)/$(LP)ecere$(SOV),$(OBJLIBDIR))
$(call cpq,ecere/obj/ecereCOM.release.$(PLATFORM)/$(LP)ecereCOM$(SOV),$(OBJLIBDIR))
$(call cpq,compiler/libec/obj/release.$(PLATFORM)/$(LP)ec$(SOV),$(OBJLIBDIR))
ln -sf $(LP)ecereCOM$(SOV) $(OBJLIBDIR)$(LP)ecereCOM$(SO)
ln -sf $(LP)ec$(SOV) $(OBJLIBDIR)$(LP)ec$(SO)
endif
-ifndef WINDOWS
-ifndef LINUX
+ifndef WINDOWS_TARGET
+ifndef LINUX_TARGET
$(call cpq,ecere/obj/release.$(PLATFORM)/$(LP)ecere$(SO),$(OBJLIBDIR))
$(call cpq,ecere/obj/ecereCOM.release.$(PLATFORM)/$(LP)ecereCOM$(SO),$(OBJLIBDIR))
$(call cpq,compiler/libec/obj/release.$(PLATFORM)/$(LP)ec$(SO),$(OBJLIBDIR))
prepcodeguard: eda
ifdef CodeGuard
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
$(call cpq,eda/libeda/obj/release.$(PLATFORM)/$(LP)EDA$(SO),$(OBJBINDIR))
endif
-ifdef LINUX
+ifdef LINUX_TARGET
$(call cpq,eda/libeda/obj/release.$(PLATFORM)/$(LP)EDA$(SOV),$(OBJLIBDIR))
ln -sf $(LP)EDA$(SOV) $(OBJLIBDIR)$(LP)EDA$(SO).0
ln -sf $(LP)EDA$(SOV) $(OBJLIBDIR)$(LP)EDA$(SO)
endif
-ifndef WINDOWS
-ifndef LINUX
+ifndef WINDOWS_TARGET
+ifndef LINUX_TARGET
$(call cpq,eda/libeda/obj/release.$(PLATFORM)/$(LP)EDA$(SO),$(OBJLIBDIR))
endif
endif
ifdef EDASQLiteCipher
$(call rmq,$(SODESTDIR)$(LP)EDASQLiteCipher$(SO))
endif
-ifdef LINUX
+ifdef LINUX_TARGET
$(call rmq,$(SODESTDIR)$(LP)ecere$(SO).0)
$(call rmq,$(SODESTDIR)$(LP)ecereCOM$(SO).0)
$(call rmq,$(SODESTDIR)$(LP)ec$(SO).0)
# Binaries (always in $(OBJBINDIR)) and Static Libraries (always in $(OBJLIBDIR))
prepinstall: $(DOC) $(BINARIES) outputdirs
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
$(call cpq,ecere/obj/release.$(PLATFORM)/$(LP)ecere$(SO),$(OBJBINDIR))
$(call cpq,ecere/obj/ecereCOM.release.$(PLATFORM)/$(LP)ecereCOM$(SO),$(OBJBINDIR))
$(call cpq,compiler/libec/obj/release.$(PLATFORM)/$(LP)ec$(SO),$(OBJBINDIR))
endif
endif
-ifdef LINUX
+ifdef LINUX_TARGET
$(call cpq,ecere/obj/release.$(PLATFORM)/$(LP)ecere$(SOV),$(OBJLIBDIR))
$(call cpq,ecere/obj/ecereCOM.release.$(PLATFORM)/$(LP)ecereCOM$(SOV),$(OBJLIBDIR))
$(call cpq,compiler/libec/obj/release.$(PLATFORM)/$(LP)ec$(SOV),$(OBJLIBDIR))
endif
endif
-ifndef WINDOWS
-ifndef LINUX
+ifndef WINDOWS_TARGET
+ifndef LINUX_TARGET
$(call cpq,ecere/obj/release.$(PLATFORM)/$(LP)ecere$(SO),$(OBJLIBDIR))
$(call cpq,ecere/obj/ecereCOM.release.$(PLATFORM)/$(LP)ecereCOM$(SO),$(OBJLIBDIR))
$(call cpq,compiler/libec/obj/release.$(PLATFORM)/$(LP)ec$(SO),$(OBJLIBDIR))
@$(call echo,The Ecere SDK has been installed. copyonlyinstall.)
actualinstall:
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
$(call mkdirq,"$(BINDIR)/")
$(call mkdirq,"$(SLIBDIR)/")
$(call mkdirq,"$(DOCDIR)/")
$(call cpq,doc/EDA.eCdoc,"$(DOCDIR)/")
endif
-ifdef OSX
+ifdef OSX_TARGET
install $(OBJLIBDIR)$(LP)ecere$(SO) $(LIBDIR)/
install $(OBJLIBDIR)$(LP)ecereCOM$(SO) $(LIBDIR)/
install $(OBJLIBDIR)$(LP)ec$(SO) $(LIBDIR)/
cp -pRf extras/* $(EXTRASDIR)
endif
-ifndef OSX
-ifndef WINDOWS
-ifdef LINUX
+ifndef OSX_TARGET
+ifndef WINDOWS_TARGET
+ifdef LINUX_TARGET
install -D $(OBJLIBDIR)$(LP)ecere$(SOV) $(LIBDIR)/$(LP)ecere$(SOV)
install -D $(OBJLIBDIR)$(LP)ecereCOM$(SOV) $(LIBDIR)/$(LP)ecereCOM$(SOV)
install -D $(OBJLIBDIR)$(LP)ec$(SOV) $(LIBDIR)/$(LP)ec$(SOV)
$(call rmq,"$(DOCDIR)/ecere.eCdoc")
$(call rmq,"$(DOCDIR)/ecereCOM.eCdoc")
$(call rmq,"$(DOCDIR)/EDA.eCdoc")
-ifdef LINUX
+ifdef LINUX_TARGET
$(call rmq,"$(LIBDIR)/$(LP)ecere$(SO).0")
$(call rmq,"$(LIBDIR)/$(LP)ecereCOM$(SO).0")
$(call rmq,"$(LIBDIR)/$(LP)ec$(SO).0")
$(call rmdirq,"$(LIBDIR)/")
$(call rmdirq,"$(SLIBDIR)/")
$(call rmdirq,"$(DOCDIR)/")
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
$(call rmdirq,"$(DESTDIR)/")
endif
@$(call echo,The Ecere SDK has been uninstalled.)
troubleshoot:
@$(call echo,Printing values of some variables.)
+ @$(call echo,HOST_PLATFORM=$(HOST_PLATFORM))
+ @$(call echo,TARGET_PLATFORM=$(HOST_PLATFORM))
+ @$(call echo,PLATFORM=$(PLATFORM))
+ @$(call echo,LINUX_HOST=$(LINUX_HOST))
+ @$(call echo,LINUX_TARGET=$(LINUX_TARGET))
+ @$(call echo,OSX_HOST=$(OSX_HOST))
+ @$(call echo,OSX_TARGET=$(OSX_TARGET))
+ @$(call echo,WINDOWS_HOST=$(WINDOWS_HOST))
+ @$(call echo,WINDOWS_TARGET=$(WINDOWS_TARGET))
+ @$(call echo,BSD_HOST=$(BSD_HOST))
+ @$(call echo,BSD_TARGET=$(BSD_TARGET))
@$(call echo,CCACHE=$(CCACHE))
@$(call echo,CCACHE_COMPILE=$(CCACHE_COMPILE))
@$(call echo,CCACHE_PREFIX=$(CCACHE_PREFIX))
OBJ = libec/obj/$(CONFIG).$(PLATFORM)/
PRECOMPILED_SOURCES = libec/precompiled/expression.c libec/precompiled/grammar.c libec/precompiled/type.c
+include ../crossplatform.mk
include ../include.mk
all: ecp ecc ecs
OBJ = obj/bin.$(PLATFORM)/
+include ../../crossplatform.mk
include ../../include.mk
all: bindir ecere libec ecp ecc ecs
cd ecc && $(MAKE) clean
cd ecs && $(MAKE) clean
$(call rmq,$(OBJ)ecp$(E) $(OBJ)ecc$(E) $(OBJ)ecs$(E))
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
$(call rmq,$(OBJ)$(LP)ecere$(SO) $(OBJ)$(LP)ec$(SO))
endif
# CROSS-PLATFORM MAGIC
+include ../../../crossplatform.mk
include ../../../include.mk
# FLAGS
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# PLATFORM-SPECIFIC OPTIONS
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
else
-ifdef LINUX
+ifdef LINUX_TARGET
LIBS += -lm -ldl
else
-ifdef OSX
+ifdef OSX_TARGET
LIBS += -lm -ldl
# CROSS-PLATFORM MAGIC
+include ../../../crossplatform.mk
include ../../../include.mk
# FLAGS
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# CROSS-PLATFORM MAGIC
+include ../../../crossplatform.mk
include ../../../include.mk
# FLAGS
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# PLATFORM-SPECIFIC OPTIONS
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
else
-ifdef LINUX
+ifdef LINUX_TARGET
LIBS += -lm -ldl
else
-ifdef OSX
+ifdef OSX_TARGET
LIBS += -lm -ldl
# CROSS-PLATFORM MAGIC
+include ../../../crossplatform.mk
include ../../../include.mk
# FLAGS
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# PLATFORM-SPECIFIC OPTIONS
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
else
-ifdef LINUX
+ifdef LINUX_TARGET
LIBS += -lm -ldl
else
-ifdef OSX
+ifdef OSX_TARGET
LIBS += -lm -ldl
# CROSS-PLATFORM MAGIC
+include ../../../crossplatform.mk
include ../../../include.mk
# FLAGS
# CROSS-PLATFORM MAGIC
+include ../../crossplatform.mk
include ../../include.mk
# TOOLCHAIN
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# CROSS-PLATFORM MAGIC
+include ../../crossplatform.mk
include ../../include.mk
# TOOLCHAIN
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# CROSS-PLATFORM MAGIC
+include ../../crossplatform.mk
include ../../include.mk
# TOOLCHAIN
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# CROSS-PLATFORM MAGIC
+include ../../crossplatform.mk
include ../../include.mk
-ifdef LINUX
+ifdef LINUX_TARGET
TARGET = obj/$(CONFIG).$(PLATFORM)/$(LP)ec$(SO).0.44
SONAME = -Wl,-soname,libec.so.0
else
# TOOLCHAIN
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
else
export LD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
export DYLD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
$(EAR) awq $(TARGET) locale/zh_CN/LC_MESSAGES/ec.mo "locale/zh_CN/LC_MESSAGES"
$(EAR) awq $(TARGET) locale/es_ES/LC_MESSAGES/ec.mo "locale/es_ES/LC_MESSAGES"
$(call cpq,$(TARGET),../../$(SODESTDIR))
-ifdef LINUX
+ifdef LINUX_TARGET
ln -sf $(LP)$(MODULE)$(SO).0.44 ../../$(SODESTDIR)$(LP)$(MODULE)$(SO).0
ln -sf $(LP)$(MODULE)$(SO).0.44 ../../$(SODESTDIR)$(LP)$(MODULE)$(SO)
endif
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
$(call cpq,$(TARGET),../../compiler/bootstrap/obj/bin.$(PLATFORM)/)
endif
# HOST PLATFORM DETECTION
ifeq "$(OS)" "Windows_NT"
- WINDOWS = defined
+ HOST_PLATFORM := win32
+ WINDOWS_HOST := defined
else
ifeq "$(OSTYPE)" "FreeBSD"
- BSD = defined
+# tocheck: temporarily using linux when on bsd
+# HOST_PLATFORM := bsd
+# BSD_HOST := defined
+ HOST_PLATFORM := linux
+ LINUX_HOST := defined
else
ifeq "$(shell uname)" "Darwin"
- OSX = defined
+ HOST_PLATFORM := apple
+ OSX_HOST := defined
else
- LINUX = defined
+ HOST_PLATFORM := linux
+ LINUX_HOST := defined
endif
endif
endif
-# PLATFORM (TARGET)
+# TARGET_PLATFORM
+ifndef TARGET_PLATFORM
+ifdef PLATFORM
+ TARGET_PLATFORM := $(PLATFORM)
+endif
+endif
+ifndef TARGET_PLATFORM
+ifdef WINDOWS_HOST
+ TARGET_PLATFORM := win32
+else
+ifdef OSX_HOST
+ TARGET_PLATFORM := apple
+else
+ifdef BSD_HOST
+ TARGET_PLATFORM := bsd
+else
+ TARGET_PLATFORM := linux
+endif
+endif
+endif
+endif
ifndef PLATFORM
-ifdef WINDOWS
- PLATFORM := win32
+ PLATFORM := $(TARGET_PLATFORM)
+endif
+ifeq "$(TARGET_PLATFORM)" "win32"
+ WINDOWS_TARGET := defined
else
-ifdef OSX
- PLATFORM := apple
+ifeq "$(TARGET_PLATFORM)" "apple"
+ OSX_TARGET := defined
+else
+ifeq "$(TARGET_PLATFORM)" "bsd"
+ BSD_TARGET := defined
else
- PLATFORM := linux
+ LINUX_TARGET := defined
endif
endif
endif
shwspace = $(subst \7f,\$(space),$1)
# PATH SEPARATOR STRING TOOLS
-ifdef WINDOWS
+ifdef WINDOWS_HOST
ifndef MSYSCON
WIN_PS_TOOLS := defined
endif
C := .c
O := .o
A := .a
-ifeq "$(PLATFORM)" "win32"
+ifdef WINDOWS_TARGET
E := .exe
ifeq "$(TARGET_TYPE)" "staticlib"
LP := lib
endif
SO := .dll
else
-ifeq "$(PLATFORM)" "apple"
+ifdef OSX_TARGET
E :=
LP := lib
SO := .dylib
endif
# SHELL COMMANDS
-ifdef WINDOWS
+ifdef WINDOWS_HOST
ifndef MSYSCON
WIN_SHELL_COMMANDS := defined
endif
ECSLIBOPT :=
endif
endif
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
FVISIBILITY :=
FPIC :=
ifeq "$(TARGET_TYPE)" "executable"
LINKOPT :=
STRIPOPT := -x --strip-unneeded --remove-section=.comment --remove-section=.note
endif
-ifdef WINDOWS
- SODESTDIR := obj/$(PLATFORM)/bin/
+ifdef WINDOWS_TARGET
+ SODESTDIR := obj/$(TARGET_PLATFORM)/bin/
else
- SODESTDIR := obj/$(PLATFORM)/lib/
+ SODESTDIR := obj/$(TARGET_PLATFORM)/lib/
endif
_L = $(if $(filter $(1),$(EXCLUDED_LIBS)),,-l$(1))
# COMMON LIBRARIES DETECTION
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
ifdef OPENSSL_CONF
_OPENSSL_CONF = $(call hidspace,$(call fixps,$(OPENSSL_CONF)))
OPENSSL_LIB_DIR = $(call shwspace,$(subst /bin/openssl.cfg,/lib,$(_OPENSSL_CONF)))
OPENSSL_BIN_DIR = $(call shwspace,$(subst /bin/openssl.cfg,/bin,$(_OPENSSL_CONF)))
else
-# To avoid confusion with empty -L/-I
+# to avoid issues with empty -L/-I
OPENSSL_INCLUDE_DIR = .
OPENSSL_LIB_DIR = .
OPENSSL_BIN_DIR = .
# CROSS-PLATFORM MAGIC
+include ../crossplatform.mk
include ../include.mk
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
all: freetype jpeg png gif ffi z
else
-ifdef OSX
+ifdef OSX_TARGET
all: jpeg png gif
else
all: gif
# CROSS-PLATFORM MAGIC
+include ../../crossplatform.mk
include ../../include.mk
# FLAGS
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# CROSS-PLATFORM MAGIC
+include ../../crossplatform.mk
include ../../include.mk
# FLAGS
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# INCLUDES
+include ../../crossplatform.mk
include ../../include.mk
# VARIABLES
# CROSS-PLATFORM MAGIC
+include ../../crossplatform.mk
include ../../include.mk
# FLAGS
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# CROSS-PLATFORM MAGIC
+include ../../crossplatform.mk
include ../../include.mk
# FLAGS
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# CROSS-PLATFORM MAGIC
+include ../../crossplatform.mk
include ../../include.mk
# FLAGS
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# CROSS-PLATFORM MAGIC
+include ../crossplatform.mk
include ../include.mk
# TOOLCHAIN
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# CROSS-PLATFORM MAGIC
+include ../crossplatform.mk
include ../include.mk
all:
# CROSS-PLATFORM MAGIC
+include ../../crossplatform.mk
include ../../include.mk
# TOOLCHAIN
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# CROSS-PLATFORM MAGIC
+include ../../crossplatform.mk
include ../../include.mk
# TOOLCHAIN
UPXFLAGS = -9 -q --no-progress --no-color
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# PLATFORM-SPECIFIC OPTIONS
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
LIBS += -lmpr -lwinmm -limm32
else
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += \
-L/usr/X11R6/lib
LIBS += -lfontconfig -lfreetype -lXrender -lXext -lncurses -lm -ldl -lpthread -lX11
else
-ifdef OSX
+ifdef OSX_TARGET
OFLAGS += \
-L/usr/X11R6/lib
ifndef NOSTRIP
$(STRIP) $(STRIPOPT) $(TARGET)
endif
-ifndef WINDOWS
+ifndef WINDOWS_TARGET
ifeq "$(TARGET_TYPE)" "executable"
@-$(call psep,$(UPX) $(UPXFLAGS) $(TARGET)) || $(call echo,upx not installed; not compressing.)
endif
# CROSS-PLATFORM MAGIC
+include ../crossplatform.mk
include ../include.mk
-ifdef LINUX
+ifdef LINUX_TARGET
TARGET = obj/$(CONFIG).$(PLATFORM)/$(LP)$(MODULE)$(SO).0.44
SONAME = -Wl,-soname,libecere.so.0
else
$(OBJ)harfbuzz-tibetan.o \
$(OBJ)harfbuzz-impl.o \
$(OBJ)harfbuzz-thai.o \
- $(if $(WINDOWS),$(OBJ)Direct3D8DisplayDriver.o,) \
- $(if $(WINDOWS),$(OBJ)Direct3D9DisplayDriver.o,) \
- $(if $(WINDOWS),$(OBJ)DirectDrawDisplayDriver.o,) \
- $(if $(WINDOWS),$(OBJ)GDIDisplayDriver.o,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Direct3D8DisplayDriver.o,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Direct3D9DisplayDriver.o,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)DirectDrawDisplayDriver.o,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)GDIDisplayDriver.o,) \
$(OBJ)lfbBlit.o \
$(OBJ)lfbConvert.o \
$(OBJ)LFBDisplayDriver.o \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)NCursesDisplayDriver.o,) \
- $(if $(OSX),,$(OBJ)OpenGLDisplayDriver.o) \
- $(if $(WINDOWS),$(OBJ)Win32BitmapPrinterDisplayDriver.o,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)NCursesDisplayDriver.o,) \
+ $(if $(OSX_TARGET),,$(OBJ)OpenGLDisplayDriver.o) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32BitmapPrinterDisplayDriver.o,) \
$(if $(OSX),$(OBJ)CocoaOpenGLDisplayDriver.o,) \
- $(if $(WINDOWS),$(OBJ)Win32ConsoleDisplayDriver.o,) \
- $(if $(WINDOWS),$(OBJ)Win32PrinterDisplayDriver.o,) \
- $(if $(LINUX),$(OBJ)XDisplayDriver.o,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32ConsoleDisplayDriver.o,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32PrinterDisplayDriver.o,) \
+ $(if $(LINUX_TARGET),$(OBJ)XDisplayDriver.o,) \
$(OBJ)Bitmap.o \
$(OBJ)BitmapResource.o \
$(OBJ)Color.o \
$(OBJ)MessageBox.o \
$(OBJ)ReplaceDialog.o \
$(OBJ)WindowList.o \
- $(if $(OSX),$(OBJ)CocoaDispatch.o,) \
- $(if $(OSX),$(OBJ)CocoaEcereBridge.o,) \
- $(if $(OSX),$(OBJ)CocoaInterface.o,) \
- $(if $(OSX),$(OBJ)EcereView.o,) \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)NCursesInterface.o,) \
- $(if $(WINDOWS),$(OBJ)Win32Interface.o,) \
- $(if $(WINDOWS),$(OBJ)Win32ConsoleInterface.o,) \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)XInterface.o,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaDispatch.o,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaEcereBridge.o,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaInterface.o,) \
+ $(if $(OSX_TARGET),$(OBJ)EcereView.o,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)NCursesInterface.o,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32Interface.o,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32ConsoleInterface.o,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)XInterface.o,) \
$(OBJ)TVisionSkin.o \
$(OBJ)WindowsSkin.o \
$(OBJ)Anchor.o \
$(OBJ)PCXFormat.c \
$(OBJ)PNGFormat.c \
$(OBJ)RGBFormat.c \
- $(if $(WINDOWS),$(OBJ)Direct3D8DisplayDriver.c,) \
- $(if $(WINDOWS),$(OBJ)Direct3D9DisplayDriver.c,) \
- $(if $(WINDOWS),$(OBJ)DirectDrawDisplayDriver.c,) \
- $(if $(WINDOWS),$(OBJ)GDIDisplayDriver.c,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Direct3D8DisplayDriver.c,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Direct3D9DisplayDriver.c,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)DirectDrawDisplayDriver.c,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)GDIDisplayDriver.c,) \
$(OBJ)lfbBlit.c \
$(OBJ)lfbConvert.c \
$(OBJ)LFBDisplayDriver.c \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)NCursesDisplayDriver.c,)
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)NCursesDisplayDriver.c,)
COBJECTS2 = \
- $(if $(OSX),,$(OBJ)OpenGLDisplayDriver.c) \
- $(if $(WINDOWS),$(OBJ)Win32BitmapPrinterDisplayDriver.c,) \
- $(if $(OSX),$(OBJ)CocoaOpenGLDisplayDriver.c,) \
- $(if $(WINDOWS),$(OBJ)Win32ConsoleDisplayDriver.c,) \
- $(if $(WINDOWS),$(OBJ)Win32PrinterDisplayDriver.c,) \
- $(if $(LINUX),$(OBJ)XDisplayDriver.c,) \
+ $(if $(OSX_TARGET),,$(OBJ)OpenGLDisplayDriver.c) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32BitmapPrinterDisplayDriver.c,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaOpenGLDisplayDriver.c,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32ConsoleDisplayDriver.c,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32PrinterDisplayDriver.c,) \
+ $(if $(LINUX_TARGET),$(OBJ)XDisplayDriver.c,) \
$(OBJ)Bitmap.c \
$(OBJ)BitmapResource.c \
$(OBJ)Color.c \
$(OBJ)MessageBox.c \
$(OBJ)ReplaceDialog.c \
$(OBJ)WindowList.c \
- $(if $(OSX),$(OBJ)CocoaDispatch.c,)
+ $(if $(OSX_TARGET),$(OBJ)CocoaDispatch.c,)
COBJECTS3 = \
- $(if $(OSX),$(OBJ)CocoaInterface.c,) \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)NCursesInterface.c,) \
- $(if $(WINDOWS),$(OBJ)Win32Interface.c,) \
- $(if $(WINDOWS),$(OBJ)Win32ConsoleInterface.c,) \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)XInterface.c,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaInterface.c,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)NCursesInterface.c,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32Interface.c,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32ConsoleInterface.c,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)XInterface.c,) \
$(OBJ)TVisionSkin.c \
$(OBJ)WindowsSkin.c \
$(OBJ)Anchor.c \
$(OBJ)PCXFormat.sym \
$(OBJ)PNGFormat.sym \
$(OBJ)RGBFormat.sym \
- $(if $(WINDOWS),$(OBJ)Direct3D8DisplayDriver.sym,) \
- $(if $(WINDOWS),$(OBJ)Direct3D9DisplayDriver.sym,) \
- $(if $(WINDOWS),$(OBJ)DirectDrawDisplayDriver.sym,) \
- $(if $(WINDOWS),$(OBJ)GDIDisplayDriver.sym,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Direct3D8DisplayDriver.sym,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Direct3D9DisplayDriver.sym,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)DirectDrawDisplayDriver.sym,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)GDIDisplayDriver.sym,) \
$(OBJ)lfbBlit.sym \
$(OBJ)lfbConvert.sym \
$(OBJ)LFBDisplayDriver.sym
SYMBOLS2 = \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)NCursesDisplayDriver.sym,) \
- $(if $(OSX),,$(OBJ)OpenGLDisplayDriver.sym) \
- $(if $(WINDOWS),$(OBJ)Win32BitmapPrinterDisplayDriver.sym,) \
- $(if $(OSX),$(OBJ)CocoaOpenGLDisplayDriver.sym,) \
- $(if $(WINDOWS),$(OBJ)Win32ConsoleDisplayDriver.sym,) \
- $(if $(WINDOWS),$(OBJ)Win32PrinterDisplayDriver.sym,) \
- $(if $(LINUX),$(OBJ)XDisplayDriver.sym,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)NCursesDisplayDriver.sym,) \
+ $(if $(OSX_TARGET),,$(OBJ)OpenGLDisplayDriver.sym) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32BitmapPrinterDisplayDriver.sym,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaOpenGLDisplayDriver.sym,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32ConsoleDisplayDriver.sym,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32PrinterDisplayDriver.sym,) \
+ $(if $(LINUX_TARGET),$(OBJ)XDisplayDriver.sym,) \
$(OBJ)Bitmap.sym \
$(OBJ)BitmapResource.sym \
$(OBJ)Color.sym \
$(OBJ)MessageBox.sym \
$(OBJ)ReplaceDialog.sym \
$(OBJ)WindowList.sym \
- $(if $(OSX),$(OBJ)CocoaDispatch.sym,) \
- $(if $(OSX),$(OBJ)CocoaInterface.sym,) \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)NCursesInterface.sym,) \
- $(if $(WINDOWS),$(OBJ)Win32Interface.sym,) \
- $(if $(WINDOWS),$(OBJ)Win32ConsoleInterface.sym,) \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)XInterface.sym,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaDispatch.sym,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaInterface.sym,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)NCursesInterface.sym,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32Interface.sym,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32ConsoleInterface.sym,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)XInterface.sym,) \
$(OBJ)TVisionSkin.sym \
$(OBJ)WindowsSkin.sym \
$(OBJ)Anchor.sym \
$(OBJ)PCXFormat.imp \
$(OBJ)PNGFormat.imp \
$(OBJ)RGBFormat.imp \
- $(if $(WINDOWS),$(OBJ)Direct3D8DisplayDriver.imp,) \
- $(if $(WINDOWS),$(OBJ)Direct3D9DisplayDriver.imp,) \
- $(if $(WINDOWS),$(OBJ)DirectDrawDisplayDriver.imp,) \
- $(if $(WINDOWS),$(OBJ)GDIDisplayDriver.imp,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Direct3D8DisplayDriver.imp,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Direct3D9DisplayDriver.imp,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)DirectDrawDisplayDriver.imp,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)GDIDisplayDriver.imp,) \
$(OBJ)lfbBlit.imp \
$(OBJ)lfbConvert.imp \
$(OBJ)LFBDisplayDriver.imp
IMPORTS2 = \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)NCursesDisplayDriver.imp,) \
- $(if $(OSX),,$(OBJ)OpenGLDisplayDriver.imp) \
- $(if $(WINDOWS),$(OBJ)Win32BitmapPrinterDisplayDriver.imp,) \
- $(if $(OSX),$(OBJ)CocoaOpenGLDisplayDriver.imp,) \
- $(if $(WINDOWS),$(OBJ)Win32ConsoleDisplayDriver.imp,) \
- $(if $(WINDOWS),$(OBJ)Win32PrinterDisplayDriver.imp,) \
- $(if $(LINUX),$(OBJ)XDisplayDriver.imp,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)NCursesDisplayDriver.imp,) \
+ $(if $(OSX_TARGET),,$(OBJ)OpenGLDisplayDriver.imp) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32BitmapPrinterDisplayDriver.imp,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaOpenGLDisplayDriver.imp,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32ConsoleDisplayDriver.imp,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32PrinterDisplayDriver.imp,) \
+ $(if $(LINUX_TARGET),$(OBJ)XDisplayDriver.imp,) \
$(OBJ)Bitmap.imp \
$(OBJ)BitmapResource.imp \
$(OBJ)Color.imp \
$(OBJ)MessageBox.imp \
$(OBJ)ReplaceDialog.imp \
$(OBJ)WindowList.imp \
- $(if $(OSX),$(OBJ)CocoaDispatch.imp,) \
- $(if $(OSX),$(OBJ)CocoaInterface.imp,) \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)NCursesInterface.imp,) \
- $(if $(WINDOWS),$(OBJ)Win32Interface.imp,) \
- $(if $(WINDOWS),$(OBJ)Win32ConsoleInterface.imp,) \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)XInterface.imp,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaDispatch.imp,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaInterface.imp,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)NCursesInterface.imp,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32Interface.imp,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32ConsoleInterface.imp,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)XInterface.imp,) \
$(OBJ)TVisionSkin.imp \
$(OBJ)WindowsSkin.imp \
$(OBJ)Anchor.imp \
src/gfx/drivers/harfbuzz/harfbuzz-tibetan.c \
src/gfx/drivers/harfbuzz/harfbuzz-impl.c \
src/gfx/drivers/harfbuzz/harfbuzz-thai.c \
- $(if $(WINDOWS),src/gfx/drivers/Direct3D8DisplayDriver.ec,) \
- $(if $(WINDOWS),src/gfx/drivers/Direct3D9DisplayDriver.ec,) \
- $(if $(WINDOWS),src/gfx/drivers/DirectDrawDisplayDriver.ec,) \
- $(if $(WINDOWS),src/gfx/drivers/GDIDisplayDriver.ec,) \
+ $(if $(WINDOWS_TARGET),src/gfx/drivers/Direct3D8DisplayDriver.ec,) \
+ $(if $(WINDOWS_TARGET),src/gfx/drivers/Direct3D9DisplayDriver.ec,) \
+ $(if $(WINDOWS_TARGET),src/gfx/drivers/DirectDrawDisplayDriver.ec,) \
+ $(if $(WINDOWS_TARGET),src/gfx/drivers/GDIDisplayDriver.ec,) \
src/gfx/drivers/lfbBlit.ec \
src/gfx/drivers/lfbConvert.ec \
src/gfx/drivers/LFBDisplayDriver.ec \
- $(if $(or $(LINUX),$(OSX)),src/gfx/drivers/NCursesDisplayDriver.ec,) \
- $(if $(OSX),,src/gfx/drivers/OpenGLDisplayDriver.ec) \
- $(if $(WINDOWS),src/gfx/drivers/Win32BitmapPrinterDisplayDriver.ec,) \
- $(if $(OSX),src/gfx/drivers/CocoaOpenGLDisplayDriver.ec,) \
- $(if $(WINDOWS),src/gfx/drivers/Win32ConsoleDisplayDriver.ec,) \
- $(if $(WINDOWS),src/gfx/drivers/Win32PrinterDisplayDriver.ec,) \
- $(if $(LINUX),src/gfx/drivers/XDisplayDriver.ec,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),src/gfx/drivers/NCursesDisplayDriver.ec,) \
+ $(if $(OSX_TARGET),,src/gfx/drivers/OpenGLDisplayDriver.ec) \
+ $(if $(WINDOWS_TARGET),src/gfx/drivers/Win32BitmapPrinterDisplayDriver.ec,) \
+ $(if $(OSX_TARGET),src/gfx/drivers/CocoaOpenGLDisplayDriver.ec,) \
+ $(if $(WINDOWS_TARGET),src/gfx/drivers/Win32ConsoleDisplayDriver.ec,) \
+ $(if $(WINDOWS_TARGET),src/gfx/drivers/Win32PrinterDisplayDriver.ec,) \
+ $(if $(LINUX_TARGET),src/gfx/drivers/XDisplayDriver.ec,) \
src/gfx/Bitmap.ec \
src/gfx/BitmapResource.ec \
src/gfx/Color.ec \
src/gui/dialogs/MessageBox.ec \
src/gui/dialogs/ReplaceDialog.ec \
src/gui/dialogs/WindowList.ec \
- $(if $(OSX),src/gui/drivers/cocoa/CocoaDispatch.ec,) \
- $(if $(OSX),src/gui/drivers/cocoa/CocoaEcereBridge.m,) \
- $(if $(OSX),src/gui/drivers/cocoa/CocoaInterface.ec,) \
- $(if $(OSX),src/gui/drivers/cocoa/EcereView.m,) \
- $(if $(or $(LINUX),$(OSX)),src/gui/drivers/NCursesInterface.ec,) \
- $(if $(WINDOWS),src/gui/drivers/Win32Interface.ec,) \
- $(if $(WINDOWS),src/gui/drivers/Win32ConsoleInterface.ec,) \
- $(if $(or $(LINUX),$(OSX)),src/gui/drivers/XInterface.ec,) \
+ $(if $(OSX_TARGET),src/gui/drivers/cocoa/CocoaDispatch.ec,) \
+ $(if $(OSX_TARGET),src/gui/drivers/cocoa/CocoaEcereBridge.m,) \
+ $(if $(OSX_TARGET),src/gui/drivers/cocoa/CocoaInterface.ec,) \
+ $(if $(OSX_TARGET),src/gui/drivers/cocoa/EcereView.m,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),src/gui/drivers/NCursesInterface.ec,) \
+ $(if $(WINDOWS_TARGET),src/gui/drivers/Win32Interface.ec,) \
+ $(if $(WINDOWS_TARGET),src/gui/drivers/Win32ConsoleInterface.ec,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),src/gui/drivers/XInterface.ec,) \
src/gui/skins/TVisionSkin.ec \
src/gui/skins/WindowsSkin.ec \
src/gui/Anchor.ec \
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# PLATFORM-SPECIFIC OPTIONS
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
CFLAGS += \
-isystem ../deps/glext \
LIBS += -ldxguid -lddraw -ldinput -lwinmm -lopengl32 -lws2_32 -lkernel32 -luser32 -lgdi32 -lmpr -ladvapi32 -lshell32 -lwinspool -limm32 -lungif
else
-ifdef LINUX
+ifdef LINUX_TARGET
CFLAGS += \
-I/usr/include/freetype2 \
LIBS += -lncurses -lpthread -lm -ldl -lfontconfig -lungif -lX11 -lXext -lXrender -lGL
else
-ifdef OSX
+ifdef OSX_TARGET
CFLAGS += \
-I/usr/include/freetype2 \
ifndef NOSTRIP
$(STRIP) $(STRIPOPT) $(TARGET)
endif
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
$(call cpq,$(TARGET),../compiler/bootstrap/obj/bin.$(PLATFORM)/)
endif
$(call cpq,$(TARGET),../$(SODESTDIR))
-ifdef LINUX
+ifdef LINUX_TARGET
ln -sf $(LP)$(MODULE)$(SO).0.44 ../$(SODESTDIR)$(LP)$(MODULE)$(SO).0
ln -sf $(LP)$(MODULE)$(SO).0.44 ../$(SODESTDIR)$(LP)$(MODULE)$(SO)
endif
$(EAR) awq $(TARGET) locale/zh_CN/LC_MESSAGES/ecere.mo "locale/zh_CN/LC_MESSAGES"
$(EAR) awq $(TARGET) locale/es_ES/LC_MESSAGES/ecere.mo "locale/es_ES/LC_MESSAGES"
$(call cpq,$(TARGET),../$(SODESTDIR))
-ifdef LINUX
+ifdef LINUX_TARGET
ln -sf $(LP)$(MODULE)$(SO).0.44 ../$(SODESTDIR)$(LP)$(MODULE)$(SO).0
ln -sf $(LP)$(MODULE)$(SO).0.44 ../$(SODESTDIR)$(LP)$(MODULE)$(SO)
endif
# CROSS-PLATFORM MAGIC
+include ../crossplatform.mk
include ../include.mk
-ifdef LINUX
+ifdef LINUX_TARGET
TARGET = obj/$(MODULE).$(CONFIG).$(PLATFORM)/$(LP)ecereCOM$(SO).0.44
SONAME = -Wl,-soname,libecereCOM.so.0
else
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
LIBS += -ldl -lm -lpthread
$(STRIP) $(STRIPOPT) $(TARGET)
endif
$(call cpq,$(TARGET),../$(SODESTDIR))
-ifdef LINUX
+ifdef LINUX_TARGET
ln -sf $(LP)$(MODULE)$(SO).0.44 ../$(SODESTDIR)$(LP)$(MODULE)$(SO).0
ln -sf $(LP)$(MODULE)$(SO).0.44 ../$(SODESTDIR)$(LP)$(MODULE)$(SO)
endif
$(OBJ)System.c.o \
$(OBJ)i18n.o \
$(OBJ)BMPFormat.o \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-freetype.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-unicode-tables.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-unicode.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-arabic.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-buffer.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-gdef.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-gpos.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-gsub.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-hangul.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-hebrew.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-indic.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-khmer.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-myanmar.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-open.o)
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-freetype.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-unicode-tables.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-unicode.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-arabic.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-buffer.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-gdef.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-gpos.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-gsub.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-hangul.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-hebrew.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-indic.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-khmer.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-myanmar.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-open.o)
OBJECTS2 = \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-shaper.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-stream.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-tibetan.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-impl.o) \
- $(if $(WINDOWS),,$(OBJ)harfbuzz-thai.o) \
- $(if $(WINDOWS),$(OBJ)GDIDisplayDriver.o,) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-shaper.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-stream.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-tibetan.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-impl.o) \
+ $(if $(WINDOWS_TARGET),,$(OBJ)harfbuzz-thai.o) \
+ $(if $(WINDOWS_TARGET),$(OBJ)GDIDisplayDriver.o,) \
$(OBJ)lfbBlit.o \
$(OBJ)lfbConvert.o \
$(OBJ)LFBDisplayDriver.o \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)NCursesDisplayDriver.o,) \
- $(if $(OSX),$(OBJ)CocoaOpenGLDisplayDriver.o,) \
- $(if $(LINUX),$(OBJ)XDisplayDriver.o,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)NCursesDisplayDriver.o,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaOpenGLDisplayDriver.o,) \
+ $(if $(LINUX_TARGET),$(OBJ)XDisplayDriver.o,) \
$(OBJ)Bitmap.o \
$(OBJ)BitmapResource.o \
$(OBJ)Color.o \
$(OBJ)MessageBox.o \
$(OBJ)ReplaceDialog.o \
$(OBJ)WindowList.o \
- $(if $(OSX),$(OBJ)CocoaDispatch.o,) \
- $(if $(OSX),$(OBJ)CocoaEcereBridge.o,) \
- $(if $(OSX),$(OBJ)CocoaInterface.o,) \
- $(if $(OSX),$(OBJ)EcereView.o,) \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)NCursesInterface.o,) \
- $(if $(WINDOWS),$(OBJ)Win32Interface.o,) \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)XInterface.o,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaDispatch.o,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaEcereBridge.o,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaInterface.o,) \
+ $(if $(OSX_TARGET),$(OBJ)EcereView.o,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)NCursesInterface.o,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32Interface.o,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)XInterface.o,) \
$(OBJ)WindowsSkin.o \
$(OBJ)Anchor.o \
$(OBJ)ClipBoard.o \
$(OBJ)units.c \
$(OBJ)i18n.c \
$(OBJ)BMPFormat.c \
- $(if $(WINDOWS),$(OBJ)GDIDisplayDriver.c,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)GDIDisplayDriver.c,) \
$(OBJ)lfbBlit.c \
$(OBJ)lfbConvert.c \
$(OBJ)LFBDisplayDriver.c \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)NCursesDisplayDriver.c,) \
- $(if $(OSX),$(OBJ)CocoaOpenGLDisplayDriver.c,) \
- $(if $(LINUX),$(OBJ)XDisplayDriver.c,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)NCursesDisplayDriver.c,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaOpenGLDisplayDriver.c,) \
+ $(if $(LINUX_TARGET),$(OBJ)XDisplayDriver.c,) \
$(OBJ)Bitmap.c \
$(OBJ)BitmapResource.c \
$(OBJ)Color.c \
$(OBJ)MessageBox.c \
$(OBJ)ReplaceDialog.c \
$(OBJ)WindowList.c \
- $(if $(OSX),$(OBJ)CocoaDispatch.c,) \
- $(if $(OSX),$(OBJ)CocoaInterface.c,) \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)NCursesInterface.c,) \
- $(if $(WINDOWS),$(OBJ)Win32Interface.c,) \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)XInterface.c,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaDispatch.c,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaInterface.c,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)NCursesInterface.c,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32Interface.c,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)XInterface.c,) \
$(OBJ)WindowsSkin.c \
$(OBJ)Anchor.c \
$(OBJ)ClipBoard.c \
$(OBJ)units.sym \
$(OBJ)i18n.sym \
$(OBJ)BMPFormat.sym \
- $(if $(WINDOWS),$(OBJ)GDIDisplayDriver.sym,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)GDIDisplayDriver.sym,) \
$(OBJ)lfbBlit.sym \
$(OBJ)lfbConvert.sym \
$(OBJ)LFBDisplayDriver.sym \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)NCursesDisplayDriver.sym,) \
- $(if $(OSX),$(OBJ)CocoaOpenGLDisplayDriver.sym,) \
- $(if $(LINUX),$(OBJ)XDisplayDriver.sym,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)NCursesDisplayDriver.sym,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaOpenGLDisplayDriver.sym,) \
+ $(if $(LINUX_TARGET),$(OBJ)XDisplayDriver.sym,) \
$(OBJ)Bitmap.sym \
$(OBJ)BitmapResource.sym \
$(OBJ)Color.sym \
$(OBJ)MessageBox.sym \
$(OBJ)ReplaceDialog.sym \
$(OBJ)WindowList.sym \
- $(if $(OSX),$(OBJ)CocoaDispatch.sym,) \
- $(if $(OSX),$(OBJ)CocoaInterface.sym,) \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)NCursesInterface.sym,) \
- $(if $(WINDOWS),$(OBJ)Win32Interface.sym,) \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)XInterface.sym,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaDispatch.sym,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaInterface.sym,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)NCursesInterface.sym,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32Interface.sym,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)XInterface.sym,) \
$(OBJ)WindowsSkin.sym \
$(OBJ)Anchor.sym \
$(OBJ)ClipBoard.sym \
$(OBJ)units.imp \
$(OBJ)i18n.imp \
$(OBJ)BMPFormat.imp \
- $(if $(WINDOWS),$(OBJ)GDIDisplayDriver.imp,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)GDIDisplayDriver.imp,) \
$(OBJ)lfbBlit.imp \
$(OBJ)lfbConvert.imp \
$(OBJ)LFBDisplayDriver.imp \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)NCursesDisplayDriver.imp,) \
- $(if $(OSX),$(OBJ)CocoaOpenGLDisplayDriver.imp,) \
- $(if $(LINUX),$(OBJ)XDisplayDriver.imp,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)NCursesDisplayDriver.imp,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaOpenGLDisplayDriver.imp,) \
+ $(if $(LINUX_TARGET),$(OBJ)XDisplayDriver.imp,) \
$(OBJ)Bitmap.imp \
$(OBJ)BitmapResource.imp \
$(OBJ)Color.imp \
$(OBJ)MessageBox.imp \
$(OBJ)ReplaceDialog.imp \
$(OBJ)WindowList.imp \
- $(if $(OSX),$(OBJ)CocoaDispatch.imp,) \
- $(if $(OSX),$(OBJ)CocoaInterface.imp,) \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)NCursesInterface.imp,) \
- $(if $(WINDOWS),$(OBJ)Win32Interface.imp,) \
- $(if $(or $(LINUX),$(OSX)),$(OBJ)XInterface.imp,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaDispatch.imp,) \
+ $(if $(OSX_TARGET),$(OBJ)CocoaInterface.imp,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)NCursesInterface.imp,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)Win32Interface.imp,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),$(OBJ)XInterface.imp,) \
$(OBJ)WindowsSkin.imp \
$(OBJ)Anchor.imp \
$(OBJ)ClipBoard.imp \
src/sys/System.c \
src/sys/i18n.ec \
src/gfx/bitmaps/BMPFormat.ec \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/unicode/harfbuzz-freetype.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/unicode/harfbuzz-unicode-tables.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/unicode/harfbuzz-unicode.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/harfbuzz-arabic.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/harfbuzz-buffer.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/harfbuzz-gdef.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/harfbuzz-gpos.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/harfbuzz-gsub.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/harfbuzz-hangul.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/harfbuzz-hebrew.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/harfbuzz-indic.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/harfbuzz-khmer.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/harfbuzz-myanmar.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/harfbuzz-open.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/harfbuzz-shaper.c)
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/unicode/harfbuzz-freetype.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/unicode/harfbuzz-unicode-tables.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/unicode/harfbuzz-unicode.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/harfbuzz-arabic.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/harfbuzz-buffer.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/harfbuzz-gdef.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/harfbuzz-gpos.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/harfbuzz-gsub.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/harfbuzz-hangul.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/harfbuzz-hebrew.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/harfbuzz-indic.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/harfbuzz-khmer.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/harfbuzz-myanmar.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/harfbuzz-open.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/harfbuzz-shaper.c)
SOURCES2 = \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/harfbuzz-stream.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/harfbuzz-tibetan.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/harfbuzz-impl.c) \
- $(if $(WINDOWS),,src/gfx/drivers/harfbuzz/harfbuzz-thai.c) \
- $(if $(WINDOWS),src/gfx/drivers/GDIDisplayDriver.ec,) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/harfbuzz-stream.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/harfbuzz-tibetan.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/harfbuzz-impl.c) \
+ $(if $(WINDOWS_TARGET),,src/gfx/drivers/harfbuzz/harfbuzz-thai.c) \
+ $(if $(WINDOWS_TARGET),src/gfx/drivers/GDIDisplayDriver.ec,) \
src/gfx/drivers/lfbBlit.ec \
src/gfx/drivers/lfbConvert.ec \
src/gfx/drivers/LFBDisplayDriver.ec \
- $(if $(or $(LINUX),$(OSX)),src/gfx/drivers/NCursesDisplayDriver.ec,) \
- $(if $(OSX),src/gfx/drivers/CocoaOpenGLDisplayDriver.ec,) \
- $(if $(LINUX),src/gfx/drivers/XDisplayDriver.ec,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),src/gfx/drivers/NCursesDisplayDriver.ec,) \
+ $(if $(OSX_TARGET),src/gfx/drivers/CocoaOpenGLDisplayDriver.ec,) \
+ $(if $(LINUX_TARGET),src/gfx/drivers/XDisplayDriver.ec,) \
src/gfx/Bitmap.ec \
src/gfx/BitmapResource.ec \
src/gfx/Color.ec \
src/gui/dialogs/ReplaceDialog.ec
SOURCES3 = \
src/gui/dialogs/WindowList.ec \
- $(if $(OSX),src/gui/drivers/cocoa/CocoaDispatch.ec,) \
- $(if $(OSX),src/gui/drivers/cocoa/CocoaEcereBridge.m,) \
- $(if $(OSX),src/gui/drivers/cocoa/CocoaInterface.ec,) \
- $(if $(OSX),src/gui/drivers/cocoa/EcereView.m,) \
- $(if $(or $(LINUX),$(OSX)),src/gui/drivers/NCursesInterface.ec,) \
- $(if $(WINDOWS),src/gui/drivers/Win32Interface.ec,) \
- $(if $(or $(LINUX),$(OSX)),src/gui/drivers/XInterface.ec,) \
+ $(if $(OSX_TARGET),src/gui/drivers/cocoa/CocoaDispatch.ec,) \
+ $(if $(OSX_TARGET),src/gui/drivers/cocoa/CocoaEcereBridge.m,) \
+ $(if $(OSX_TARGET),src/gui/drivers/cocoa/CocoaInterface.ec,) \
+ $(if $(OSX_TARGET),src/gui/drivers/cocoa/EcereView.m,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),src/gui/drivers/NCursesInterface.ec,) \
+ $(if $(WINDOWS_TARGET),src/gui/drivers/Win32Interface.ec,) \
+ $(if $(or $(LINUX_TARGET),$(OSX_TARGET)),src/gui/drivers/XInterface.ec,) \
src/gui/skins/WindowsSkin.ec \
src/gui/Anchor.ec \
src/gui/ClipBoard.ec \
# CROSS-PLATFORM MAGIC
+include ../crossplatform.mk
include ../include.mk
# TOOLCHAIN
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
-ifdef OSX
+ifdef OSX_TARGET
OFLAGS += -framework cocoa -framework OpenGL
endif
# PLATFORM-SPECIFIC OPTIONS
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
CFLAGS += \
-I../deps/DirectX-9.0/include \
-I../deps/glext
else
-ifdef LINUX
+ifdef LINUX_TARGET
CFLAGS += \
-I/usr/include/freetype2 \
-I../deps/libungif-4.1.1/lib
else
-ifdef OSX
+ifdef OSX_TARGET
CFLAGS += \
-I/usr/include/freetype2 \
# CROSS-PLATFORM MAGIC
+include ../crossplatform.mk
include ../include.mk
all:
# CROSS-PLATFORM MAGIC
+include ../../../crossplatform.mk
include ../../../include.mk
-ifdef LINUX
+ifdef LINUX_TARGET
TARGET = obj/$(CONFIG).$(PLATFORM)/$(LP)EDASQLite$(SO).0.44
SONAME = -Wl,-soname,$(LP)EDASQLite$(SO).0
else
endif
OBJECTS = \
- $(if $(LINUX),,$(OBJ)sqlite3.o) \
+ $(if $(LINUX_TARGET),,$(OBJ)sqlite3.o) \
$(OBJ)EDASQLite.o \
$(OBJ)$(MODULE).main$(O)
$(OBJ)EDASQLite.imp
SOURCES = \
- $(if $(LINUX),,sqlite3.c) \
+ $(if $(LINUX_TARGET),,sqlite3.c) \
EDASQLite.ec
RESOURCES = \
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# PLATFORM-SPECIFIC OPTIONS
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
CFLAGS += \
-I../../../deps/libffi-3.0.11/i686-pc-mingw32/include
endif
else
-ifdef LINUX
+ifdef LINUX_TARGET
CFLAGS += \
-I/usr/include/i686-linux-gnu
endif
else
-ifdef OSX
+ifdef OSX_TARGET
ifneq "$(TARGET_TYPE)" "staticlib"
LIBS += -lpthread -ldl
$(EAR) awq $(TARGET) locale/zh_CN/LC_MESSAGES/EDASQLite.mo "locale/zh_CN/LC_MESSAGES"
$(EAR) awq $(TARGET) locale/es_ES/LC_MESSAGES/EDASQLite.mo "locale/es_ES/LC_MESSAGES"
$(call cpq,$(TARGET),../../../$(SODESTDIR))
-ifdef LINUX
+ifdef LINUX_TARGET
ln -sf $(LP)$(MODULE)$(SO).0.44 ../../../$(SODESTDIR)$(LP)$(MODULE)$(SO).0
ln -sf $(LP)$(MODULE)$(SO).0.44 ../../../$(SODESTDIR)$(LP)$(MODULE)$(SO)
endif
# CROSS-PLATFORM MAGIC
+include ../../../crossplatform.mk
include ../../../include.mk
-ifdef LINUX
+ifdef LINUX_TARGET
TARGET = obj/$(CONFIG).$(PLATFORM)/$(LP)EDASQLiteCipher$(SO).0.44
SONAME = -Wl,-soname,$(LP)EDASQLiteCipher$(SO).0
else
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# PLATFORM-SPECIFIC OPTIONS
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
CFLAGS += \
-I../../../deps/libffi-3.0.11/i686-pc-mingw32/include \
LIBS += -llibeay32
else
-ifdef LINUX
+ifdef LINUX_TARGET
CFLAGS += \
-I/usr/include/i686-linux-gnu
LIBS += -lpthread -ldl -lcrypto
else
-ifdef OSX
+ifdef OSX_TARGET
LIBS += -lpthread -ldl -lcrypto
$(EAR) awq $(TARGET) locale/zh_CN/LC_MESSAGES/EDASQLiteCipher.mo "locale/zh_CN/LC_MESSAGES"
$(EAR) awq $(TARGET) locale/es_ES/EDASQLiteCipher.mo "locale/es_ES/LC_MESSAGES"
$(call cpq,$(TARGET),../../../$(SODESTDIR))
-ifdef LINUX
+ifdef LINUX_TARGET
ln -sf $(LP)$(MODULE)$(SO).0.44 ../../../$(SODESTDIR)$(LP)$(MODULE)$(SO).0
ln -sf $(LP)$(MODULE)$(SO).0.44 ../../../$(SODESTDIR)$(LP)$(MODULE)$(SO)
endif
# CROSS-PLATFORM MAGIC
+include ../../crossplatform.mk
include ../../include.mk
-ifdef LINUX
+ifdef LINUX_TARGET
TARGET = obj/$(CONFIG).$(PLATFORM)/$(LP)EDA$(SO).0.44
SONAME = -Wl,-soname,$(LP)EDA$(SO).0
else
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# PLATFORM-SPECIFIC OPTIONS
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
CFLAGS += \
-I../../deps/libffi-3.0.11/i686-pc-mingw32/include
endif
-ifdef LINUX
+ifdef LINUX_TARGET
CFLAGS += \
-I/usr/include/i686-linux-gnu
$(EAR) awq $(TARGET) locale/zh_CN/LC_MESSAGES/EDA.mo "locale/zh_CN/LC_MESSAGES"
$(EAR) awq $(TARGET) locale/es_ES/LC_MESSAGES/EDA.mo "locale/es_ES/LC_MESSAGES"
$(call cpq,$(TARGET),../../$(SODESTDIR))
-ifdef LINUX
+ifdef LINUX_TARGET
ln -sf $(LP)$(MODULE)$(SO).0.44 ../../$(SODESTDIR)$(LP)$(MODULE)$(SO).0
ln -sf $(LP)$(MODULE)$(SO).0.44 ../../$(SODESTDIR)$(LP)$(MODULE)$(SO)
endif
RESOURCES = \
locale/zh_CN/LC_MESSAGES/epj2make.mo \
- ../include.mk
+ ../crossplatform.mk
ifndef DEBIAN_PACKAGE
CFLAGS =
# CROSS-PLATFORM MAGIC
+include ../crossplatform.mk
include ../include.mk
# TOOLCHAIN
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
endif
}
if(valid)
{
- project.GenerateCompilerMk(defaultCompiler);
- project.GenerateCrossPlatformCf();
+ project.GenerateCompilerCf(defaultCompiler);
+ project.GenerateCrossPlatformMk();
if(project.GenerateMakefile(makePath, noResources, includemkPath, project.config))
{
if(makePath)
$(OBJ)ProjectNode.o \
$(OBJ)ProjectView.o \
$(OBJ)Workspace.o \
- $(if $(WINDOWS),$(OBJ)vsSupport.o,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)vsSupport.o,) \
$(OBJ)CodeEditor.o \
$(OBJ)CodeObject.o \
$(OBJ)Designer.o \
$(OBJ)ProjectNode.c \
$(OBJ)ProjectView.c \
$(OBJ)Workspace.c \
- $(if $(WINDOWS),$(OBJ)vsSupport.c,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)vsSupport.c,) \
$(OBJ)CodeEditor.c \
$(OBJ)CodeObject.c \
$(OBJ)Designer.c \
$(OBJ)ProjectNode.sym \
$(OBJ)ProjectView.sym \
$(OBJ)Workspace.sym \
- $(if $(WINDOWS),$(OBJ)vsSupport.sym,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)vsSupport.sym,) \
$(OBJ)CodeEditor.sym \
$(OBJ)CodeObject.sym \
$(OBJ)Designer.sym \
$(OBJ)ProjectNode.imp \
$(OBJ)ProjectView.imp \
$(OBJ)Workspace.imp \
- $(if $(WINDOWS),$(OBJ)vsSupport.imp,) \
+ $(if $(WINDOWS_TARGET),$(OBJ)vsSupport.imp,) \
$(OBJ)CodeEditor.imp \
$(OBJ)CodeObject.imp \
$(OBJ)Designer.imp \
src/project/ProjectNode.ec \
src/project/ProjectView.ec \
src/project/Workspace.ec \
- $(if $(WINDOWS),src/project/vsSupport.ec,) \
+ $(if $(WINDOWS_TARGET),src/project/vsSupport.ec,) \
src/designer/CodeEditor.ec \
src/designer/CodeObject.ec \
src/designer/Designer.ec \
res/ecere.jpg \
res/ecereBack.jpg \
res/icon.png \
- ../include.mk \
../crossplatform.mk
ifndef DEBIAN_PACKAGE
# CROSS-PLATFORM MAGIC
+include ../crossplatform.mk
include ../include.mk
# TOOLCHAIN
UPXFLAGS = -9 -q
# HARD CODED PLATFORM-SPECIFIC OPTIONS
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += -Wl,--no-undefined
endif
# PLATFORM-SPECIFIC OPTIONS
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
LIBS += obj/resources.o
else
-ifdef LINUX
+ifdef LINUX_TARGET
OFLAGS += \
-L/usr/X11R6/lib
LIBS += -lX11
else
-ifdef OSX
+ifdef OSX_TARGET
OFLAGS += \
-L/usr/X11R6/lib
$(SYMBOLS): | objdir
$(OBJECTS): | objdir
$(TARGET): $(SOURCES) $(RESOURCES) $(SYMBOLS) $(OBJECTS) | objdir
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
$(TARGET): obj/resources.o
endif
$(CC) $(OFLAGS) $(OBJECTS) $(LIBS) -o $(TARGET) $(INSTALLNAME)
ifndef NOSTRIP
$(STRIP) $(STRIPOPT) $(TARGET)
endif
- $(EAR) awq $(TARGET) res/ecere.jpg res/ecereBack.jpg res/icon.png ../include.mk ../crossplatform.mk ""
+ $(EAR) awq $(TARGET) res/ecere.jpg res/ecereBack.jpg res/icon.png ../crossplatform.mk ""
$(EAR) awq $(TARGET) $(RES)actions/attach.png $(RES)actions/delete.png $(RES)actions/detach.png $(RES)actions/docNew.png $(RES)actions/editCopy.png $(RES)actions/editDelete.png $(RES)actions/delete2.png $(RES)actions/build.png $(RES)actions/clean.png $(RES)actions/debug.png "actions"
$(EAR) awq $(TARGET) $(RES)actions/docOpen.png $(RES)actions/docSave.png $(RES)actions/docSaveAll.png $(RES)actions/pause.png $(RES)actions/projAdd.png $(RES)actions/projNew.png $(RES)actions/projOpen.png $(RES)actions/rebuild.png $(RES)actions/regMakefile.png $(RES)actions/relink.png "actions"
$(EAR) awq $(TARGET) $(RES)actions/restart.png $(RES)actions/run.png $(RES)actions/skipBreaks.png $(RES)actions/stepInto.png $(RES)actions/stepOut.png $(RES)actions/stepOver.png $(RES)actions/stopDebug.png "actions"
$(EAR) awq $(TARGET) ../extras/res/licenses/gpl.LICENSE "licenses"
$(call cpq,$(TARGET),../obj/$(PLATFORM)/bin/)
-ifdef WINDOWS
+ifdef WINDOWS_TARGET
obj/resources.o: src/icon2.ico src/resources.rc | objdir
windres src/resources.rc obj/resources.o
endif
char * CopyValidateMakefilePath(char * path)
{
- const int map[] = { 0, 1, 2, 3, 4, 5, 6, 0, 1, 7 };
- const char * vars[] = { "$(MODULE)", "$(CONFIG)", "$(PLATFORM)", "$(COMPILER)", "$(TARGET)", "$(COMPILER_SUFFIX)", "$(DEBUG_SUFFIX)", "$(PROJECT)", "$(CONFIGURATION)",(char *)0 };
+ const int map[] = { 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 7 };
+ const char * vars[] = { "$(MODULE)", "$(CONFIG)", "$(PLATFORM)", "$(COMPILER)", "$(TARGET)", "$(COMPILER_SUFFIX)", "$(DEBUG_SUFFIX)", "$(PROJECT)", "$(CONFIGURATION)", "$(TARGET_PLATFORM)",(char *)0 };
char * copy = null;
if(path)
{
return platform == win32 ? "WINDOWS" :
platform == tux ? "LINUX" :
- platform == apple ? "OSX"/*"APPLE"*/ :
+ platform == apple ? "OSX" :
platform;
}
return config ? config.name : "Common";
}
+char * PlatformToMakefileTargetVariable(Platform platform)
+{
+ return platform == win32 ? "WINDOWS_TARGET" :
+ platform == tux ? "LINUX_TARGET" :
+ platform == apple ? "OSX_TARGET" :
+ "ERROR_BAD_TARGET";
+}
+
class Project : struct
{
class_no_expansion; // To use Find on the Container<Project> in Workspace::projects
strcpy(makeFilePath, topNode.path);
CatMakeFileName(makeFile, config);
PathCatSlash(makeFilePath, makeFile);
-
+
// TODO: TEST ON UNIX IF \" around makeTarget is ok
if(onlyNode)
{
ChangeWorkingDir(topNode.path);
// Create object dir if it does not exist already
if(!FileExists(objDirExp.dir).isDirectory)
- Execute("%s CF_DIR=%s%s%s COMPILER=%s objdir -C \"%s\" -f \"%s\"", compiler.makeCommand, cfDir,
- crossCompiling ? " PLATFORM=" : "", targetPlatform, compilerName, topNode.path, makeFilePath);
+ {
+ sprintf(command, "%s CF_DIR=\"%s\"%s%s COMPILER=%s objdir -C \"%s\" -f \"%s\"",
+ compiler.makeCommand, cfDir,
+ crossCompiling ? " TARGET_PLATFORM=" : "", targetPlatform,
+ compilerName, topNode.path, makeFilePath);
+#ifdef _DEBUG
+ PrintLn(command);
+ ide.outputView.buildBox.Logf("command: %s\n", command);
+#endif
+ Execute(command);
+ }
+
ChangeWorkingDir(pushD);
PathCatSlash(makeTarget+1, objDirExp.dir);
sprintf(command, "%s /useenv /nologo /logcommands %s.sln %s|Win32", compiler.makeCommand, name, config.name);
ide.outputView.buildBox.Logf("command: %s\n", command);
+#ifdef _DEBUG
+ PrintLn(command);
+ ide.outputView.buildBox.Logf("command: %s\n", command);
+#endif
if((f = DualPipeOpen(PipeOpenMode { output = true, error = true, input = true }, command)))
{
ProcessPipeOutputRaw(f);
{
char cfDir[MAX_LOCATION];
GetIDECompilerConfigsDir(cfDir, true, true);
- sprintf(command, "%s CF_DIR=\"%s\"%s%s COMPILER=%s -j%d %s%s%s -C \"%s\" -f \"%s\"", compiler.makeCommand, cfDir,
- crossCompiling ? " PLATFORM=" : "", targetPlatform,
+ sprintf(command, "%s CF_DIR=\"%s\"%s%s COMPILER=%s -j%d %s%s%s -C \"%s\" -f \"%s\"",
+ compiler.makeCommand, cfDir,
+ crossCompiling ? " TARGET_PLATFORM=" : "", targetPlatform,
compilerName, numJobs,
compiler.ccacheEnabled ? "CCACHE=y " : "",
compiler.distccEnabled ? "DISTCC=y " : "",
makeTarget, topNode.path, makeFilePath);
+#ifdef _DEBUG
+ PrintLn(command);
+ ide.outputView.buildBox.Logf("command: %s\n", command);
+#endif
if((f = DualPipeOpen(PipeOpenMode { output = true, error = true, input = true }, command)))
{
result = ProcessBuildPipeOutput(f, objDirExp, isARun, onlyNode, compiler, config);
delete f;
}
else
+ {
ide.outputView.buildBox.Logf($"Error executing make (%s) command\n", compiler.makeCommand);
+#ifndef _DEBUG
+ ide.outputView.buildBox.Logf("command: %s\n", command);
+#endif
+ }
}
delete pathBackup;
sprintf(command, "%s /useenv /clean /nologo /logcommands %s.sln %s|Win32", compiler.makeCommand, name, config.name);
ide.outputView.buildBox.Logf("command: %s\n", command);
+#ifdef _DEBUG
+ PrintLn(command);
+ ide.outputView.buildBox.Logf("command: %s\n", command);
+#endif
if((f = DualPipeOpen(PipeOpenMode { output = true, error = true, input = true }, command)))
{
ProcessPipeOutputRaw(f);
{
char cfDir[MAX_LOCATION];
GetIDECompilerConfigsDir(cfDir, true, true);
- sprintf(command, "%s CF_DIR=%s%s%s COMPILER=%s %sclean -C \"%s\" -f \"%s\"", compiler.makeCommand, cfDir,
- crossCompiling ? " PLATFORM=" : "", targetPlatform, compilerName, realclean ? "real" : "", topNode.path, makeFilePath);
+ sprintf(command, "%s CF_DIR=\"%s\"%s%s COMPILER=%s %sclean -C \"%s\" -f \"%s\"",
+ compiler.makeCommand, cfDir,
+ crossCompiling ? " TARGET_PLATFORM=" : "", targetPlatform,
+ compilerName, realclean ? "real" : "", topNode.path, makeFilePath);
+#ifdef _DEBUG
+ PrintLn(command);
+ ide.outputView.buildBox.Logf("command: %s\n", command);
+#endif
if((f = DualPipeOpen(PipeOpenMode { output = 1, error = 1, input = 2 }, command)))
{
ide.outputView.buildBox.Tell($"Deleting target and object files...");
}
}
- bool GenerateCrossPlatformCf()
+ bool GenerateCrossPlatformMk()
{
bool result = false;
char path[MAX_LOCATION];
return result;
}
- bool GenerateCompilerMk(CompilerConfig compiler)
+ bool GenerateCompilerCf(CompilerConfig compiler)
{
bool result = false;
char path[MAX_LOCATION];
File f = FileOpen(path, write);
if(f)
{
- /*
- if(compiler.targetPlatform != GetRuntimePlatform())
- f.Printf("\nPLATFORM = %s\n", (char *)compiler.targetPlatform);
- */
-
f.Printf("# TOOLCHAIN\n\n");
//f.Printf("SHELL := %s\n", "sh"/*compiler.shellCommand*/); // is this really needed?
f.Printf("CXX := $(CCACHE_COMPILE) $(DISTCC_COMPILE) %s\n", compiler.cxxCommand);
f.Printf("ECP := %s\n", compiler.ecpCommand);
f.Printf("ECC := %s\n", compiler.eccCommand);
- f.Printf("ECS := %s -t $(PLATFORM)\n", compiler.ecsCommand);
+ f.Printf("ECS := %s -t $(TARGET_PLATFORM)\n", compiler.ecsCommand);
f.Printf("EAR := %s\n", compiler.earCommand);
f.Printf("AS := as\n");
f.Printf("UPXFLAGS = -9\n\n"); // TOFEAT: Compression Level Option? Other UPX Options?
- f.Printf("# HARD CODED PLATFORM-SPECIFIC OPTIONS\n");
- f.Printf("ifeq \"$(PLATFORM)\" \"linux\"\n"); //, PlatformToMakefileVariable(tux));
+ f.Printf("# HARD CODED TARGET_PLATFORM-SPECIFIC OPTIONS\n");
+ f.Printf("ifdef %s\n", PlatformToMakefileTargetVariable(tux));
f.Printf("LDFLAGS += -Wl,--no-undefined\n");
f.Printf("endif\n\n");
// JF's
- f.Printf("ifeq \"$(PLATFORM)\" \"apple\"\n"); //%s\n", PlatformToMakefileVariable(apple));
+ f.Printf("ifdef %s\n", PlatformToMakefileTargetVariable(apple));
f.Printf("LDFLAGS += -framework cocoa -framework OpenGL\n");
f.Printf("endif\n");
if(ifCount)
f.Printf("else\n");
ifCount++;
- f.Printf("ifeq \"$(PLATFORM)\" \"%s\"\n", (char *)platform); //%s\n", PlatformToMakefileVariable(platform));
+ f.Printf("ifdef %s\n", PlatformToMakefileTargetVariable(platform));
f.Printf("TARGET_TYPE = ");
f.Printf(TargetTypeToMakefileVariable(targetType));
f.Printf("# INCLUDES\n\n");
f.Printf("include %s\n", includemkPath ? includemkPath : "$(_CF_DIR)crossplatform.mk");
- f.Printf("include $(_CF_DIR)$(PLATFORM)-$(COMPILER).cf\n");
+ f.Printf("include $(_CF_DIR)$(TARGET_PLATFORM)-$(COMPILER).cf\n");
f.Printf("\n");
f.Printf("# VARIABLES\n\n");
//for(platform = firstPlatform; platform <= lastPlatform; platform++)
//for(platform = win32; platform <= apple; platform++)
- f.Printf("# PLATFORM-SPECIFIC OPTIONS\n\n");
+ f.Printf("# TARGET_PLATFORM-SPECIFIC OPTIONS\n\n");
for(platform = (Platform)1; platform < Platform::enumSize; platform++)
{
PlatformOptions projectPlatformOptions, configPlatformOptions;
if(ifCount)
f.Printf("else\n");
ifCount++;
- f.Printf("ifeq \"$(PLATFORM)\" \"");
- // f.Printf(PlatformToMakefileVariable(platform));
- f.Printf((char *)platform);
- f.Printf("\"\n\n");
+ f.Printf("ifdef %s\n", PlatformToMakefileTargetVariable(platform));
+ f.Printf("\n");
if((projectPlatformOptions && projectPlatformOptions.options.preprocessorDefinitions && projectPlatformOptions.options.preprocessorDefinitions.count) ||
(configPlatformOptions && configPlatformOptions.options.preprocessorDefinitions && configPlatformOptions.options.preprocessorDefinitions.count) ||
OutputListOption(f, "I", options.includeDirs, lineEach, true);
f.Printf("\n\n");
- f.Printf("CECFLAGS += -cpp $(call escspace,$(CPP)) -t $(PLATFORM)");
+ f.Printf("CECFLAGS += -cpp $(call escspace,$(CPP)) -t $(TARGET_PLATFORM)");
f.Printf("\n\n");
f.Printf("ECFLAGS +=");
if(platforms || (config && config.platforms))
{
ifCount = 0;
- //f.Printf("# PLATFORM-SPECIFIC PRE-BUILD COMMANDS\n");
+ //f.Printf("# TARGET_PLATFORM-SPECIFIC PRE-BUILD COMMANDS\n");
for(platform = (Platform)1; platform < Platform::enumSize; platform++)
{
PlatformOptions projectPOs, configPOs;
if(platforms || (config && config.platforms))
{
ifCount = 0;
- //f.Printf("# PLATFORM-SPECIFIC POST-BUILD COMMANDS\n");
+ //f.Printf("# TARGET_PLATFORM-SPECIFIC POST-BUILD COMMANDS\n");
for(platform = (Platform)1; platform < Platform::enumSize; platform++)
{
PlatformOptions projectPOs, configPOs;
{
char * comma = mn.next ? "," : "";
- var = PlatformToMakefileVariable(mn.key);
+ var = PlatformToMakefileTargetVariable(mn.key);
exp = result.a;
len = strlen(exp) + strlen("$(") + strlen(var) + strlen(")") + strlen(comma);
else
{
if(exclusionInfo.root.minimum.key != unknown)
- var = PlatformToMakefileVariable(exclusionInfo.root.minimum.key);
+ var = PlatformToMakefileTargetVariable(exclusionInfo.root.minimum.key);
else
- var = PlatformToMakefileVariable(exclusionInfo.root.minimum.next.key);
+ var = PlatformToMakefileTargetVariable(exclusionInfo.root.minimum.next.key);
exp = result.a;
len = strlen(exp) + strlen("$(if $(") + strlen(var) + strlen("),");
if(*ifCount) // we really need a if defined(a) || defined(b) here
f.Printf("else\n"); // instead of repeating the rules for each platform
(*ifCount)++; //
- f.Printf("ifdef %s\n\n", PlatformToMakefileVariable(platform)); //
+ f.Printf("ifdef %s\n\n", PlatformToMakefileTargetVariable(platform)); //
if(excludedPlatforms)
excludedPlatforms[platform] = true;
}
bool ProjectPrepareCompiler(Project project, CompilerConfig compiler)
{
- project.GenerateCrossPlatformCf();
- project.GenerateCompilerMk(compiler);
+ project.GenerateCrossPlatformMk();
+ project.GenerateCompilerCf(compiler);
return true;
}
-# HOST PLATFORM DETECTION
-ifeq "$(OS)" "Windows_NT"
- WINDOWS = defined
-else
-ifeq "$(OSTYPE)" "FreeBSD"
- BSD = defined
-else
-ifeq "$(shell uname)" "Darwin"
- OSX = defined
-else
- LINUX = defined
-endif
-endif
-endif
-
-# PLATFORM (TARGET)
-ifndef PLATFORM
-ifdef WINDOWS
- PLATFORM := win32
-else
-ifdef OSX
- PLATFORM := apple
-else
- PLATFORM := linux
-endif
-endif
-endif
-
-# MISC STRING TOOLS
-empty :=
-space := $(empty) $(empty)
-escspace = $(subst $(space),\$(space),$(subst \$(space),$(space),$1))
-hidspace = $(subst $(space),\7f,$(subst \$(space),\7f,$1))
-shwspace = $(subst \7f,\$(space),$1)
-
-# PATH SEPARATOR STRING TOOLS
-ifdef WINDOWS
-ifndef MSYSCON
- WIN_PS_TOOLS := defined
-endif
-endif
-ifdef WIN_PS_TOOLS
- fixps = $(subst \,/,$(1))
- psep = $(subst \\,/,$(subst /,\,$(1)))
- PS := $(strip \)
-else
- fixps = $(1)
- PS := $(strip /)
- psep = $(1)
-endif
-
-# PREFIXES AND EXTENSIONS
-.SUFFIXES: .c .ec .sym .imp .bowl .o .a
-S := .sym
-I := .imp
-B := .bowl
-C := .c
-O := .o
-A := .a
-ifeq "$(PLATFORM)" "win32"
- E := .exe
-ifeq "$(TARGET_TYPE)" "staticlib"
- LP := lib
-else
- LP :=
-endif
- SO := .dll
-else
-ifeq "$(PLATFORM)" "apple"
- E :=
- LP := lib
- SO := .dylib
-else
- E :=
- LP := lib
- SO := .so
-endif
-endif
-
-# SUPER TOOLS
-ifdef CCACHE
- CCACHE_COMPILE := ccache
-ifdef DISTCC
- DISTCC_COMPILE := distcc
-endif
-else
-ifdef DISTCC
- DISTCC_COMPILE := distcc
-endif
-endif
-
# TOOLCHAIN
export CC = $(CCACHE_COMPILE) $(DISTCC_COMPILE) gcc
export CPP = $(CCACHE_COMPILE) $(DISTCC_COMPILE) cpp
export STRIP = strip
UPX := upx
-# SHELL COMMANDS
-ifdef WINDOWS
-ifndef MSYSCON
- WIN_SHELL_COMMANDS := defined
-endif
-endif
-ifdef WIN_SHELL_COMMANDS
- echo = $(if $(1),echo $(1))
- cpq = $(if $(1),@cmd /c for %%I in ($(call psep,$(1))) do @copy /y %%I $(call psep,$(2)) > nul 2>&1)
- rmq = $(if $(1),-@del /f /q $(call psep,$(1)) > nul 2>&1)
- rmrq = $(if $(1),-@rmdir /q /s $(call psep,$(1)) > nul 2>&1)
- mkdirq = $(if $(1),-@mkdir $(call psep,$(1)) > nul 2>&1)
- rmdirq = $(if $(1),-@rmdir /q $(call psep,$(1)) > nul 2>&1)
-else
- echo = $(if $(1),echo "$(1)")
- cpq = $(if $(1),@cp $(1) $(2))
- rmq = $(if $(1),-@rm -f $(1))
- rmrq = $(if $(1),-@rm -f -r $(1))
- mkdirq = $(if $(1),-@mkdir -p $(1))
- rmdirq = $(if $(1),-@rmdir $(1))
-endif
-
-# COMPILER OPTIONS
-ifeq "$(TARGET_TYPE)" "sharedlib"
- ECSLIBOPT := -dynamiclib
-else
-ifeq "$(TARGET_TYPE)" "staticlib"
- ECSLIBOPT := -staticlib
-else
- ECSLIBOPT :=
-endif
-endif
-ifdef WINDOWS
- FVISIBILITY :=
- FPIC :=
-ifeq "$(TARGET_TYPE)" "executable"
- EXECUTABLE := $(CONSOLE)
-else
- EXECUTABLE :=
-endif
-else
- FVISIBILITY := -fvisibility=hidden
- FPIC := -fPIC
- EXECUTABLE :=
-endif
-ifdef OSX
-ifeq "$(TARGET_TYPE)" "sharedlib"
- INSTALLNAME := -install_name $(LP)$(MODULE)$(SO)
-else
- INSTALLNAME :=
-endif
-else
- INSTALLNAME :=
-endif
-
# DEBIAN
ifdef DEBIAN_PACKAGE
CFLAGS += $(CPPFLAGS)
OFLAGS += $(LDFLAGS)
endif
-
-# LINKER OPTIONS
-ifdef OSX
-ifeq "$(TARGET_TYPE)" "sharedlib"
- SHAREDLIB := -dynamiclib -single_module -multiply_defined suppress
- LINKOPT :=
-else
- SHAREDLIB :=
- LINKOPT :=
-endif
-ifeq "$(TARGET_TYPE)" "sharedlib"
- STRIPOPT := -x
-else
- STRIPOPT := -u -r
-endif
-else
-ifeq "$(TARGET_TYPE)" "sharedlib"
- SHAREDLIB := -shared
-else
- SHAREDLIB :=
-endif
- LINKOPT :=
- STRIPOPT := -x --strip-unneeded --remove-section=.comment --remove-section=.note
-endif
-ifdef WINDOWS
- SODESTDIR := obj/$(PLATFORM)/bin/
-else
- SODESTDIR := obj/$(PLATFORM)/lib/
-endif
-
-# COMMON LIBRARIES DETECTION
-
-ifdef WINDOWS
-
-ifdef OPENSSL_CONF
-_OPENSSL_CONF = $(call hidspace,$(call fixps,$(OPENSSL_CONF)))
-OPENSSL_INCLUDE_DIR = $(call shwspace,$(subst /bin/openssl.cfg,/include,$(_OPENSSL_CONF)))
-OPENSSL_LIB_DIR = $(call shwspace,$(subst /bin/openssl.cfg,/lib,$(_OPENSSL_CONF)))
-OPENSSL_BIN_DIR = $(call shwspace,$(subst /bin/openssl.cfg,/bin,$(_OPENSSL_CONF)))
-endif
-
-endif