mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
From: Jun Kuwamura <juk@rccm.co.jp>
This patch fix the Makefiles in contrib/{pginterface, spi, miscutil, int8, ip_and_mac, sequence, soundex, string, userlock, array, datetime} to install their modules in one directory(lib/modules/).
This commit is contained in:
@ -4,21 +4,29 @@
|
||||
#
|
||||
PGINTERFACE = pginterface.o halt.o
|
||||
TARGET = pginsert pgwordcount pgnulltest
|
||||
CFLAGS = -g -Wall -I/usr/local/pgsql/include
|
||||
CFLAGS = -g -fpic -Wall -I. -I../../src/interfaces/libpq -I/usr/local/pgsql/include
|
||||
LDFLAGS = -L/usr/local/pgsql/lib -lpq
|
||||
|
||||
all : $(TARGET)
|
||||
|
||||
$(TARGET): $(PGINTERFACE) $*.c
|
||||
cc -o $* $(CFLAGS) $*.c $(PGINTERFACE) $(LDFLAGS)
|
||||
pginsert: $(PGINTERFACE) pginsert.c
|
||||
gcc -o $@ $(CFLAGS) $@.c $(PGINTERFACE) $(LDFLAGS)
|
||||
|
||||
pgwordcount: $(PGINTERFACE) pgwordcount.c
|
||||
gcc -o $@ $(CFLAGS) $@.c $(PGINTERFACE) $(LDFLAGS)
|
||||
|
||||
pgnulltest: $(PGINTERFACE) pgnulltest.c
|
||||
gcc -o $@ $(CFLAGS) $@.c $(PGINTERFACE) $(LDFLAGS)
|
||||
|
||||
pginterface.o: pginterface.c
|
||||
gcc -c $(CFLAGS) pginterface.c
|
||||
|
||||
halt.o: halt.c
|
||||
gcc -c $(CFLAGS) halt.c
|
||||
|
||||
$(PGINTERFACE): pginterface.c halt.c
|
||||
cc -c $(CFLAGS) pginterface.c halt.c
|
||||
|
||||
clean:
|
||||
rm -f *.o $(TARGET) log core
|
||||
|
||||
install:
|
||||
make clean
|
||||
make CFLAGS=-O
|
||||
install -s -o bin -g bin $(TARGET) /usr/local/bin
|
||||
install -s -o bin -g bin $(TARGET) /usr/local/pgsql/bin
|
||||
|
||||
|
Reference in New Issue
Block a user