blob: d625e24a219c8763625230a7d9d9711590f5509e [file] [log] [blame]
# @@@ START COPYRIGHT @@@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# @@@ END COPYRIGHT @@@
ifndef SQ_MTYPE
SQ_MTYPE = 32
endif
NOWARN = 1
TOOLBASE := $(shell echo `pwd` | sed -e 's|/sql\/.*||')
DEPTOOL := $(TOOLBASE)/tools/make/deptool
DEPFLAGS = $(DEFINES) $(INCLUDES) $(DEPEXCLUDES) -f depend.mk
NSK_SQ = ../../..
NSK_SQU = ../../../..
NSK = ../../nsk
include $(TRAF_HOME)/macros.gmk
ifeq ($(SQ_MTYPE),64)
CC = $(CC64) $(GCCMODE64)
CXX = $(CXX64) $(GCCMODE64)
CPP = $(CXX64) $(GCCMODE64)
CFLAGS = $(PICFLAG) $(DEFINES) $(WARN) $(GCCMODE64) $(DBG_FLGS) $(OPTIM_FLGS) $(INTEL_TOOL_FLGS)
M64 = 1
else
CC = $(CC32) $(GCCMODE32)
CXX = $(CXX32) $(GCCMODE32)
CPP = $(CXX32) $(GCCMODE32)
CFLAGS = $(PICFLAG) $(DEFINES) $(WARN) $(GCCMODE32) $(DBG_FLGS) $(OPTIM_FLGS) $(INTEL_TOOL_FLGS)
endif
CFLAGS += -fno-strict-aliasing
CPP_PROJ = -o $@ $(CFLAGS) $(INCLUDES) -c
ifdef NOWARN
WARN = -w
endif
#STATIC_LIBS = 1
ifdef STATIC_LIBS
LIBSUF = a
LINKSPEC = $(AR) r $@
else
PICFLAG = -fPIC
LIBSUF = so
LINKSPEC = $(CXX) $(LNK_FLGS) $(SHFLAG) -o $@
SHFLAG = -shared
endif
LINKIT = $(LINKSPEC) $(LINK32_OBJS)