pg-libphonenumber/Makefile

22 lines
647 B
Makefile
Raw Normal View History

EXTENSION := pg_libphonenumber
version := 1.0
extension_script := $(EXTENSION)--$(version).sql
DATA_built := $(extension_script)
MODULE_big := pg_libphonenumber
OBJS := pg_libphonenumber.o short_phone_number.o
PG_CPPFLAGS := -fPIC -std=c++11 -g
2015-07-10 20:58:40 +00:00
SHLIB_LINK := -lphonenumber -lstdc++
EXTRA_CLEAN := $(extension_script) get_sizeof_phone_number
2015-07-10 20:58:40 +00:00
PG_CONFIG := pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
$(extension_script): $(EXTENSION).sql.template get_sizeof_phone_number
sed "s/SIZEOF_PHONE_NUMBER/$(shell ./get_sizeof_phone_number)/" $< > $@
get_sizeof_phone_number: get_sizeof_phone_number.cpp
2015-07-21 17:32:30 +00:00
$(CXX) -std=c++11 $< -o $@