Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…-8b5f-43f8-b0d1-9726248d827e
  • Loading branch information
scuri committed May 16, 2018
1 parent a2a6020 commit 9b67ebe
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 12 deletions.
21 changes: 16 additions & 5 deletions cd/tecmake.mak
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ ifndef TEC_UNAME
ifeq ($(TEC_SYSARCH), amd64)
TEC_SYSARCH:=x64
endif
ifeq ($(TEC_SYSARCH), armv7l)
ifneq ($(findstring armv, $(TEC_SYSARCH)), )
TEC_SYSARCH:=arm
endif
ifeq ($(TEC_SYSARCH), armv6l)
TEC_SYSARCH:=arm
ifneq ($(findstring aarch64, $(TEC_SYSARCH)), )
TEC_SYSARCH:=arm64
endif

# Compose
Expand Down Expand Up @@ -120,17 +120,23 @@ ifndef TEC_UNAME
TEC_UNAME:=$(TEC_UNAME)_ia64
endif

# arm Linux (Raspberry Pi)
# arm Linux
ifeq ($(TEC_SYSARCH), arm)
TEC_UNAME:=$(TEC_UNAME)_arm
endif
ifeq ($(TEC_SYSARCH), arm64)
# Our dynamic library build is not working in arm64
NO_DYNAMIC ?= Yes
BUILD_64=Yes
TEC_UNAME:=$(TEC_UNAME)_arm64
endif

# Linux Distribution
TEC_DISTNAME=$(shell lsb_release -is)
TEC_DISTVERSION=$(shell lsb_release -rs|cut -f1 -d.)
TEC_DIST:=$(TEC_DISTNAME)$(TEC_DISTVERSION)

# arm Linux (Raspberry Pi)
# arm Linux (Raspberry Pi) -- NOT GOOD must be improved
ifeq ($(TEC_SYSARCH), arm)
# Raspbian GNU/Linux 7 (wheezy)
TEC_DISTNAME=Raspbian
Expand Down Expand Up @@ -239,6 +245,11 @@ ifeq ($(TEC_SYSARCH), ia64)
TEC_WORDSIZE = TEC_64
endif

ifeq ($(TEC_SYSARCH), arm64)
TEC_BYTEORDER = TEC_LITTLEENDIAN
TEC_WORDSIZE = TEC_64
endif


#---------------------------------#
# Compilation Flags
Expand Down
70 changes: 63 additions & 7 deletions cd/tecmakewin.mak
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ TECMAKE = $(TECMAKE_HOME)/tecmakewin.mak
# If tecmake.bat is not used,
# then at least define main system variables.

WIN32UNAMES = vc14 vc12 vc11 vc10 vc9 vc8 vc7 vc6 owc1 bc55 bc56 bc6 gcc3 gcc4 mingw3 mingw4 dllw4 dllg4 dll dll7 dll8 dll9 dll10 dll11 dll12 dll14
WIN64UNAMES = vc14_64 vc12_64 vc11_64 vc10_64 vc9_64 vc8_64 dll8_64 dll9_64 dll10_64 dll11_64 dll12_64 dll14_64 gcc4_64 mingw4_64 dllw4_64 dllg4_64
WIN32UNAMES = vc15 vc14 vc12 vc11 vc10 vc9 vc8 vc7 vc6 owc1 bc55 bc56 bc6 gcc3 gcc4 mingw3 mingw4 dllw4 dllg4 dll dll7 dll8 dll9 dll10 dll11 dll12 dll14 dll15
WIN64UNAMES = vc15_64 vc14_64 vc12_64 vc11_64 vc10_64 vc9_64 vc8_64 dll8_64 dll9_64 dll10_64 dll11_64 dll12_64 dll14_64 dll15_64 gcc4_64 mingw4_64 dllw4_64 dllg4_64

ifdef TEC_UNAME
ifneq ($(findstring $(TEC_UNAME), $(WIN32UNAMES)), )
Expand Down Expand Up @@ -342,6 +342,7 @@ VC10 ?= x:/lng/vc10
VC11 ?= x:/lng/vc11
VC12 ?= x:/lng/vc12
VC14 ?= x:/lng/vc14
VC15 ?= x:/lng/vc15
OWC1 ?= x:/lng/owc1
BC55 ?= x:/lng/bc55
BC56 ?= x:/lng/cbuilderx
Expand Down Expand Up @@ -422,6 +423,10 @@ ifneq ($(findstring vc14, $(TEC_UNAME)), )
COMPILER = $(VC14)
endif

ifneq ($(findstring vc15, $(TEC_UNAME)), )
COMPILER = $(VC15)
endif

ifeq "$(TEC_UNAME)" "dll"
COMPILER = $(VC6)
endif
Expand Down Expand Up @@ -464,6 +469,10 @@ ifneq ($(findstring dll14, $(TEC_UNAME)), )
COMPILER = $(VC14)
endif

ifneq ($(findstring dll15, $(TEC_UNAME)), )
COMPILER = $(VC15)
endif

ifeq "$(COMPILER)" "$(VC6)"
TEC_CC = vc
# Use the VC7 Platform SDK, no harm if VC7 is not installed
Expand Down Expand Up @@ -613,21 +622,68 @@ ifeq "$(COMPILER)" "$(VC14)"
PLATSDK_LIB := $(WINSDKBASELIB)/ucrt/$(SDKLIBBIN) $(WINSDKBASELIB)/um/$(SDKLIBBIN)
endif

ifeq "$(COMPILER)" "$(VC15)"
NEW_VC_COMPILER = Yes
NEW_SDK_UM = Yes
NEW_VC_PATH = Yes
TEC_CC = vc
STDDEFS += -DMSVC15
ifndef USE_DLL
#there is no single thread RTL in VC15
USE_MT = Yes
endif
ifdef VC15SDK
PLATSDK ?= $(VC15SDK)
else
# Not the real folder, we copied from "C:\Program Files (x86)\Windows Kits\10"
PLATSDK ?= $(VC15)/WinSDK
endif
ifdef BUILD64
SDKLIBBIN := x64
else
SDKLIBBIN := x86
endif
WINSDKVERNUM ?= 10.0.17134.0
RESBIN := $(PLATSDK)/bin/$(WINSDKVERNUM)/$(SDKLIBBIN)
WINSDKBASEINC := $(PLATSDK)/include/$(WINSDKVERNUM)
WINSDKBASELIB := $(PLATSDK)/lib/$(WINSDKVERNUM)
PLATSDK_INC := $(WINSDKBASEINC)/ucrt $(WINSDKBASEINC)/shared $(WINSDKBASEINC)/um
PLATSDK_LIB := $(WINSDKBASELIB)/ucrt/$(SDKLIBBIN) $(WINSDKBASELIB)/um/$(SDKLIBBIN)
endif

ifeq "$(TEC_CC)" "vc"
ifdef BUILD64
STDDEFS += -DWIN64
MACHINE = X64
GTK := $(GTK)_x64
VCLIBBIN = /amd64
ifdef NEW_VC_PATH
VCLIBBIN = /x64
else
VCLIBBIN = /amd64
endif
ifdef USE_X86_CL64
BIN = $(COMPILER)/bin/x86_amd64
# Compiling for 64-bits in a 32bits environment
ifdef NEW_VC_PATH
BIN = $(COMPILER)/bin/Hostx86/x64
else
BIN = $(COMPILER)/bin/x86_amd64
endif
else
BIN = $(COMPILER)/bin/amd64
ifdef NEW_VC_PATH
BIN = $(COMPILER)/bin/Hostx64/x64
else
BIN = $(COMPILER)/bin/amd64
endif
endif
else
VCLIBBIN =
MACHINE = X86
BIN = $(COMPILER)/bin
ifdef NEW_VC_PATH
VCLIBBIN = /x86
BIN = $(COMPILER)/bin/Hostx86/x86
else
VCLIBBIN =
BIN = $(COMPILER)/bin
endif
endif
RESBIN ?= $(COMPILER)/bin
CC = $(BIN)/cl -nologo
Expand Down

0 comments on commit 9b67ebe

Please sign in to comment.