-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMakefile
55 lines (38 loc) · 1.14 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# contrib/jdbc2_fdw/Makefile
MODULE_big = jdbc2_fdw
OBJS = jdbc2_fdw.o option.o deparse.o connection.o jq.o
PG_CPPFLAGS = -I$(libpq_srcdir)
SHLIB_LINK = $(libpq)
EXTENSION = jdbc2_fdw
DATA = jdbc2_fdw--1.0.sql
REGRESS = jdbc2_fdw
JDBC_CONFIG = jdbc_config
SHLIB_LINK += -ljvm
UNAME = $(shell uname)
# Special treatment for Mac OS X
ifeq ($(UNAME), Darwin)
# SHLIB_LINK = -I/System/Library/Frameworks/JavaVM.framework/Headers -L/System/Library/Frameworks/JavaVM.framework/Libraries -ljvm -framework JavaVM
SHLIB_LINK += -I$(JAVA_HOME)/include -L$(JAVA_HOME)/jre/lib -framework JavaVM
endif
TRGTS = JAVAFILES
JAVA_SOURCES = \
JDBCUtils.java \
JDBCDriverLoader.java \
PG_CPPFLAGS=-D'PKG_LIB_DIR=$(pkglibdir)' -I$(libpq_srcdir)
JFLAGS = -d $(pkglibdir)
all:$(TRGTS)
JAVAFILES:
javac $(JFLAGS) $(JAVA_SOURCES)
# the db name is hard-coded in the tests
override USE_MODULE_DB =
ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
SHLIB_PREREQS = submake-libpq
subdir = contrib/jdbc2_fdw
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif