summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@mailme.dk>2013-01-31 11:37:45 +0100
committerEmil Renner Berthing <esmil@mailme.dk>2013-01-31 15:57:08 +0100
commit43334b08b318449f42ae25f0ac8878070f7d9402 (patch)
treee070ee028e50d3510a0575946f6b9e5eaa1a901e /Makefile
parentbc525acebe8dbe4ec89e73703906b46fa6206d89 (diff)
downloadlem-postgres-43334b08b318449f42ae25f0ac8878070f7d9402.tar.gz
lem-postgres-43334b08b318449f42ae25f0ac8878070f7d9402.tar.xz
lem-postgres-43334b08b318449f42ae25f0ac8878070f7d9402.zip
Makefile: set global CFLAGS, LDFLAGS and LIBS
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 58305c6..c831f47 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,9 @@ UNAME = uname
OS = $(shell $(UNAME))
CFLAGS += $(shell $(PKG_CONFIG) --cflags lem)
+CFLAGS += -I$(shell $(PG_CONFIG) --includedir)
+LDFLAGS += -L$(shell $(PG_CONFIG) --libdir)
+LIBS = -lpq
lmoddir = $(shell $(PKG_CONFIG) --variable=INSTALL_LMOD lem)
cmoddir = $(shell $(PKG_CONFIG) --variable=INSTALL_CMOD lem)
@@ -36,9 +39,6 @@ all: $(clibs)
debug: $(clibs)
-lem/postgres.so: CFLAGS += -I$(shell $(PG_CONFIG) --includedir)
-lem/postgres.so: LDFLAGS += -L$(shell $(PG_CONFIG) --libdir)
-lem/postgres.so: LIBS += -lpq
lem/postgres.so: lem/postgres.c
$E ' CCLD $@'
$Q$(CC) $(CFLAGS) -fPIC -nostartfiles $(SHARED) $^ -o $@ $(LDFLAGS) $(LIBS)