######################################################################## # $Source: /local/data/cvs/yellowbank/postgres/src/uuid/Makefile,v $ # $Revision: 1.7 $ # $State: Exp $ # $Date: 2008/03/06 15:45:55 $ # $Author: yrp001 $ # $Locker: $ ######################################################################## ######################################################################## # Copyright (c) 2006 # Ronald Peterson # (Y) Yellowbank # All rights reserved. Applicable BSD license terms can be found in # the associated LICENSE file. ######################################################################## ######################################################################## # DATA_built = y_uuid.sql # MODULE_big = y_uuid # OBJS = y_uuid.o # SHLIB_LINK += -luuid # # DOCS = README.uuid # # PGXS := $(shell pg_config --pgxs) # include $(PGXS) ######################################################################## ######################################################################## CC = /usr/bin/gcc CXX = /usr/bin/g++ INCLUDEDIRS := -I. INCLUDEDIRS += -I$(shell pg_config --includedir-server) INCLUDEDIRS += -I$(shell pg_config --includedir) # If you are using shared libraries, make sure this location can be # found at runtime (see /etc/ld.so.conf and ldconfig command). LIBDIR = -L$(shell pg_config --libdir) # This is where the shared object should be installed LIBINSTALL = $(shell pg_config --pkglibdir) CONTRIBINSTALL = $(shell pg_config --sharedir)/contrib ######################################################################## ######################################################################## YCFLAGS = -Wall -O3 YLFLAGS = -lpq -luuid .PHONY: new all: $(MAKE) y_uuid.so cp y_uuid.sql $(CONTRIBINSTALL) %.so: %.c Makefile $(CC) -fpic -o $*.o -c $*.c $(INCLUDEDIRS) $(CC) -shared -o $*.so $*.o $(LIBDIR) $(YLFLAGS) cp $*.so $(LIBINSTALL) new: touch *.c *.h ######################################################################## ######################################################################## # Utility targets .PHONY: tags clean .SILENT: clean tags: etags *.c *.h clean: -rm *~ *.tar *.gz *.o *.so core 2>/dev/null ########################################################################