31 lines
795 B
Makefile
31 lines
795 B
Makefile
# PGSQL queue handler for Mbuni Makefile (c) 2007 Digital Solutions
|
|
# Licence: See http://mbuni.org/license.shtml
|
|
KANNELCONF = gw-config
|
|
PGCONF = pg_config
|
|
CC = gcc
|
|
MBUNIDIR = ../..
|
|
LIBTOOL = libtool
|
|
ARCH = $(shell uname -s)
|
|
CFLAGS = -Wall -g -fPIC -I$(MBUNIDIR) -g -I$(MBUNIDIR)/mmlib `$(KANNELCONF) --cflags | sed 's/-O2//g'` -I`$(PGCONF) --includedir`
|
|
|
|
ifeq ($(ARCH),Darwin)
|
|
XLDFLAGS=-dynamiclib -Wl,-flat_namespace,-undefined,suppress -arch i386 -arch ppc
|
|
LIB_EXT=dylib
|
|
CFLAGS+=-DDARWIN=1 -arch ppc -arch i386
|
|
else
|
|
XLDFLAGS=-shared
|
|
LIB_EXT=so
|
|
endif
|
|
|
|
LIB = libmms_pgsql_queue.$(LIB_EXT)
|
|
|
|
ALL: $(LIB)
|
|
|
|
$(LIB): mms_pgsql_queue.o
|
|
$(CC) $(XLDFLAGS) -o $@ $? -L$(MBUNIDIR)/mmlib -lmms `$(KANNELCONF) --libs` -L`$(PGCONF) --libdir` -lpq
|
|
|
|
clean:
|
|
rm -f *.o *~
|
|
clobber: clean
|
|
rm -f $(LIB)
|