* Propose using $(STDCPPLIBS) definition for version-independent linking
of standard C++ libraries (stdc++.r4 <-> stdc++ supc++); * Force C++ language at preprocessing the sources before localization catkeys collecting. It gives a hint for compiler to handle .pre file as C++ one preventing breaking on "unfound" C++ headers. Thanks to Vitaly Diger for pointing it out. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42926 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
## BeOS Generic Makefile v2.4 ##
|
## BeOS Generic Makefile v2.5 ##
|
||||||
|
|
||||||
## Fill in this file to specify the project being created, and the referenced
|
## Fill in this file to specify the project being created, and the referenced
|
||||||
## makefile-engine will do all of the hard work for you. This handles both
|
## makefile-engine will do all of the hard work for you. This handles both
|
||||||
@@ -56,6 +56,9 @@ RSRCS=
|
|||||||
# libXXX.so or libXXX.a you can simply specify XXX
|
# libXXX.so or libXXX.a you can simply specify XXX
|
||||||
# library: libbe.so entry: be
|
# library: libbe.so entry: be
|
||||||
#
|
#
|
||||||
|
# - for version-independent linking of standard C++ libraries please add
|
||||||
|
# $(STDCPPLIBS) instead of raw "stdc++[.r4] [supc++]" library names
|
||||||
|
#
|
||||||
# - for localization support add following libs:
|
# - for localization support add following libs:
|
||||||
# locale localestub
|
# locale localestub
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
## BeOS and Haiku Generic Makefile Engine v2.4.0
|
## BeOS and Haiku Generic Makefile Engine v2.5.0
|
||||||
## Does all the hard work for the Generic Makefile
|
## Does all the hard work for the Generic Makefile
|
||||||
## which simply defines the project parameters
|
## which simply defines the project parameters
|
||||||
|
|
||||||
## Supports Generic Makefile v2.0, 2.01, 2.1, 2.2, 2.3, 2.4
|
## Supports Generic Makefile v2.0, 2.01, 2.1, 2.2, 2.3, 2.4, 2.5
|
||||||
|
|
||||||
# determine wheather running on x86 or ppc
|
# determine wheather running on x86 or ppc
|
||||||
MACHINE=$(shell uname -m)
|
MACHINE=$(shell uname -m)
|
||||||
@@ -142,17 +142,21 @@ SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file))))
|
|||||||
VPATH :=
|
VPATH :=
|
||||||
VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
|
VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
|
||||||
|
|
||||||
# SETTING: build the local and system include paths
|
# SETTING: build the local and system include paths, compose C++ libs
|
||||||
ifeq ($(CPU), x86)
|
ifeq ($(CPU), x86)
|
||||||
LOC_INCLUDES = $(foreach path, $(SRC_PATHS) $(LOCAL_INCLUDE_PATHS), $(addprefix -I, $(path)))
|
LOC_INCLUDES = $(foreach path, $(SRC_PATHS) $(LOCAL_INCLUDE_PATHS), $(addprefix -I, $(path)))
|
||||||
ifeq ($(CC_VER), 2)
|
ifeq ($(CC_VER), 2)
|
||||||
INCLUDES = $(LOC_INCLUDES)
|
INCLUDES = $(LOC_INCLUDES)
|
||||||
INCLUDES += -I-
|
INCLUDES += -I-
|
||||||
INCLUDES += $(foreach path, $(SYSTEM_INCLUDE_PATHS), $(addprefix -I, $(path)))
|
INCLUDES += $(foreach path, $(SYSTEM_INCLUDE_PATHS), $(addprefix -I, $(path)))
|
||||||
|
|
||||||
|
STDCPPLIBS = stdc++.r4
|
||||||
else
|
else
|
||||||
INCLUDES = -iquote./
|
INCLUDES = -iquote./
|
||||||
INCLUDES += $(foreach path, $(SRC_PATHS) $(LOCAL_INCLUDE_PATHS), $(addprefix -iquote, $(path)))
|
INCLUDES += $(foreach path, $(SRC_PATHS) $(LOCAL_INCLUDE_PATHS), $(addprefix -iquote, $(path)))
|
||||||
INCLUDES += $(foreach path, $(SYSTEM_INCLUDE_PATHS), $(addprefix -isystem, $(path)))
|
INCLUDES += $(foreach path, $(SYSTEM_INCLUDE_PATHS), $(addprefix -isystem, $(path)))
|
||||||
|
|
||||||
|
STDCPPLIBS = stdc++ supc++
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
ifeq ($(CPU), ppc)
|
ifeq ($(CPU), ppc)
|
||||||
@@ -310,7 +314,7 @@ $(CATALOGS_DIR)/%.catalog : $(CATKEYS_DIR)/%.catkeys
|
|||||||
|
|
||||||
# rule to preprocess program sources into file ready for collecting catkeys
|
# rule to preprocess program sources into file ready for collecting catkeys
|
||||||
$(OBJ_DIR)/$(NAME).pre : $(SRCS)
|
$(OBJ_DIR)/$(NAME).pre : $(SRCS)
|
||||||
-cat $(SRCS) | $(CC) -E $(INCLUDES) $(CFLAGS) -DB_COLLECTING_CATKEYS - > $(OBJ_DIR)/$(NAME).pre
|
-cat $(SRCS) | $(CC) -E -x c++ $(INCLUDES) $(CFLAGS) -DB_COLLECTING_CATKEYS - > $(OBJ_DIR)/$(NAME).pre
|
||||||
|
|
||||||
# rules to collect localization catkeys
|
# rules to collect localization catkeys
|
||||||
catkeys : $(CATKEYS_DIR)/en.catkeys
|
catkeys : $(CATKEYS_DIR)/en.catkeys
|
||||||
|
|||||||
Reference in New Issue
Block a user