mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
defs.mk: Beautify compiler definition (somewhat)
This commit is contained in:
parent
34cf5d467c
commit
1133f4b7b8
1 changed files with 13 additions and 9 deletions
22
make/defs.mk
22
make/defs.mk
|
|
@ -58,10 +58,13 @@ TARGET ?= Linux
|
||||||
ifeq ($(TARGET),mingw)
|
ifeq ($(TARGET),mingw)
|
||||||
CROSS_TOOL_DIR = /opt/cross-tools
|
CROSS_TOOL_DIR = /opt/cross-tools
|
||||||
CROSS_TOOL_BIN_PREFIX = $(CROSS_TOOL_DIR)/bin/i386-mingw32-
|
CROSS_TOOL_BIN_PREFIX = $(CROSS_TOOL_DIR)/bin/i386-mingw32-
|
||||||
CC = $(CROSS_TOOL_BIN_PREFIX)gcc
|
GCC = $(CROSS_TOOL_BIN_PREFIX)gcc
|
||||||
CPP = $(CROSS_TOOL_BIN_PREFIX)g++
|
GPP = $(CROSS_TOOL_BIN_PREFIX)g++
|
||||||
LDFLAGS += -lws2_32
|
LDFLAGS += -lws2_32
|
||||||
USE_GFILTER = false
|
USE_GFILTER = false
|
||||||
|
else
|
||||||
|
GCC = gcc
|
||||||
|
GPP = g++
|
||||||
endif
|
endif
|
||||||
|
|
||||||
YTOOLS_DIR = $(MODDIR)
|
YTOOLS_DIR = $(MODDIR)
|
||||||
|
|
@ -87,8 +90,6 @@ FTP_PCKG_DIR = /pub/packages
|
||||||
JANNET_PROJ_DIR = rsync_ssh://ftp.jannet.de:/home/ftp/dat$(FTP_PCKG_DIR)
|
JANNET_PROJ_DIR = rsync_ssh://ftp.jannet.de:/home/ftp/dat$(FTP_PCKG_DIR)
|
||||||
CONFDIR = $(MODDIR)/../conf
|
CONFDIR = $(MODDIR)/../conf
|
||||||
|
|
||||||
CC ?= gcc
|
|
||||||
|
|
||||||
GCC_VERSION = $(shell gcc -v 2>&1 | grep version | awk '{ print $$3;}')
|
GCC_VERSION = $(shell gcc -v 2>&1 | grep version | awk '{ print $$3;}')
|
||||||
GCC_MAJOR = $(shell gcc -v 2>&1 | grep version | awk '{ split($$3,a,"."); print a[1];}')
|
GCC_MAJOR = $(shell gcc -v 2>&1 | grep version | awk '{ split($$3,a,"."); print a[1];}')
|
||||||
GCC_MINOR = $(shell gcc -v 2>&1 | grep version | awk '{ split($$3,a,"."); print a[2];}')
|
GCC_MINOR = $(shell gcc -v 2>&1 | grep version | awk '{ split($$3,a,"."); print a[2];}')
|
||||||
|
|
@ -320,15 +321,18 @@ endif
|
||||||
|
|
||||||
# ----- standard features, switched on with USE_XXX = true
|
# ----- standard features, switched on with USE_XXX = true
|
||||||
|
|
||||||
|
CPP ?= g++
|
||||||
|
|
||||||
ifeq ($(USE_GFILTER),true)
|
ifeq ($(USE_GFILTER),true)
|
||||||
CPP = sh $(firstword $(wildcard $(MODDIR)/contrib/gfilt/gfilt $(MODDIR)/bin/gfilt))
|
GFILT = sh $(firstword $(wildcard $(MODDIR)/contrib/gfilt/gfilt $(MODDIR)/bin/gfilt))
|
||||||
ifeq ($(strip $(CPP)),sh)
|
ifneq ($(strip $(GFILT)),sh)
|
||||||
CPP = g++
|
CPP = $(GFILT)
|
||||||
endif
|
endif
|
||||||
else
|
|
||||||
CPP ?= g++
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CC = $(GCC)
|
||||||
|
CPP = $(GPP)
|
||||||
|
|
||||||
ifeq ($(USE_PROJECT_LIB),true)
|
ifeq ($(USE_PROJECT_LIB),true)
|
||||||
PROJECTLIB_LDFLAGS += -l$(LIBNAME) -L$(TOPDIR)/lib
|
PROJECTLIB_LDFLAGS += -l$(LIBNAME) -L$(TOPDIR)/lib
|
||||||
LD_LIB_PATH += $(TOPDIR)/lib
|
LD_LIB_PATH += $(TOPDIR)/lib
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue