From 43334b08b318449f42ae25f0ac8878070f7d9402 Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing Date: Thu, 31 Jan 2013 11:37:45 +0100 Subject: Makefile: set global CFLAGS, LDFLAGS and LIBS --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Makefile') 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) -- cgit v1.2.1