-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathMakefile
60 lines (44 loc) · 1.21 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
56
57
58
##########################################################################
#
# foreign-data wrapper for JDBC
#
# Copyright (c) 2012, PostgreSQL Global Development Group
#
# This software is released under the PostgreSQL Licence
#
# Author:Atri Sharma <[email protected]>
#
# IDENTIFICATION
# jdbc_fdw/Makefile
#
##########################################################################
MODULE_big = jdbc_fdw
OBJS = jdbc_fdw.o
EXTENSION = jdbc_fdw
DATA = jdbc_fdw--1.0.sql
REGRESS = jdbc_fdw
JDBC_CONFIG = jdbc_config
SHLIB_LINK = -ljvm
UNAME = $(shell uname)
ifeq ($(UNAME), Darwin)
SHLIB_LINK = -I/System/Library/Frameworks/JavaVM.framework/Headers -L/System/Library/Frameworks/JavaVM.framework/Libraries -ljvm -framework JavaVM
endif
TRGTS = JAVAFILES
JAVA_SOURCES = \
JDBCUtils.java \
JDBCDriverLoader.java \
PG_CPPFLAGS=-D'PKG_LIB_DIR=$(pkglibdir)'
JFLAGS = -d $(pkglibdir)
all:$(TRGTS)
JAVAFILES:
javac $(JFLAGS) $(JAVA_SOURCES)
ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/jdbc_fdw
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif