refactor makefile a bit

This commit is contained in:
Moritz Eyssen 2017-10-13 11:25:40 +02:00
parent e7c2833e43
commit 0d59785ec8
1 changed files with 2 additions and 2 deletions

View File

@ -36,17 +36,17 @@ GMAKE = make mode=$(mode)
NAME := sqlparser NAME := sqlparser
PARSER_CPP = $(SRCPARSER)/bison_parser.cpp $(SRCPARSER)/flex_lexer.cpp PARSER_CPP = $(SRCPARSER)/bison_parser.cpp $(SRCPARSER)/flex_lexer.cpp
PARSER_H = $(SRCPARSER)/bison_parser.h $(SRCPARSER)/flex_lexer.h PARSER_H = $(SRCPARSER)/bison_parser.h $(SRCPARSER)/flex_lexer.h
LIB_CFLAGS = -std=c++11 -Wall -Werror $(OPT_FLAG)
static ?= no static ?= no
ifeq ($(static), yes) ifeq ($(static), yes)
LIB_BUILD = lib$(NAME).a LIB_BUILD = lib$(NAME).a
LIBLINKER = $(AR) LIBLINKER = $(AR)
LIB_CFLAGS = -std=c++11 -Wall -Werror $(OPT_FLAG)
LIB_LFLAGS = rs LIB_LFLAGS = rs
else else
LIB_BUILD = lib$(NAME).so LIB_BUILD = lib$(NAME).so
LIBLINKER = $(CXX) LIBLINKER = $(CXX)
LIB_CFLAGS = -std=c++11 -Wall -Werror -fPIC $(OPT_FLAG) LIB_CFLAGS += -fPIC
LIB_LFLAGS = -shared -o LIB_LFLAGS = -shared -o
endif endif
LIB_CPP = $(shell find $(SRC) -name '*.cpp' -not -path "$(SRCPARSER)/*") $(PARSER_CPP) LIB_CPP = $(shell find $(SRC) -name '*.cpp' -not -path "$(SRCPARSER)/*") $(PARSER_CPP)