mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +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)
|
||||
CROSS_TOOL_DIR = /opt/cross-tools
|
||||
CROSS_TOOL_BIN_PREFIX = $(CROSS_TOOL_DIR)/bin/i386-mingw32-
|
||||
CC = $(CROSS_TOOL_BIN_PREFIX)gcc
|
||||
CPP = $(CROSS_TOOL_BIN_PREFIX)g++
|
||||
GCC = $(CROSS_TOOL_BIN_PREFIX)gcc
|
||||
GPP = $(CROSS_TOOL_BIN_PREFIX)g++
|
||||
LDFLAGS += -lws2_32
|
||||
USE_GFILTER = false
|
||||
else
|
||||
GCC = gcc
|
||||
GPP = g++
|
||||
endif
|
||||
|
||||
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)
|
||||
CONFDIR = $(MODDIR)/../conf
|
||||
|
||||
CC ?= gcc
|
||||
|
||||
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_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
|
||||
|
||||
CPP ?= g++
|
||||
|
||||
ifeq ($(USE_GFILTER),true)
|
||||
CPP = sh $(firstword $(wildcard $(MODDIR)/contrib/gfilt/gfilt $(MODDIR)/bin/gfilt))
|
||||
ifeq ($(strip $(CPP)),sh)
|
||||
CPP = g++
|
||||
GFILT = sh $(firstword $(wildcard $(MODDIR)/contrib/gfilt/gfilt $(MODDIR)/bin/gfilt))
|
||||
ifneq ($(strip $(GFILT)),sh)
|
||||
CPP = $(GFILT)
|
||||
endif
|
||||
else
|
||||
CPP ?= g++
|
||||
endif
|
||||
|
||||
CC = $(GCC)
|
||||
CPP = $(GPP)
|
||||
|
||||
ifeq ($(USE_PROJECT_LIB),true)
|
||||
PROJECTLIB_LDFLAGS += -l$(LIBNAME) -L$(TOPDIR)/lib
|
||||
LD_LIB_PATH += $(TOPDIR)/lib
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue