mirror of
https://github.com/postgres/postgres.git
synced 2026-04-28 09:38:27 -04:00
This patch will... 1. Remove the "-Wall" option from the ecpg/lib and ecpg/preproc Makefile. 2. Remove the addition of $(SRCDIR)/include and-or $(SRCDIR)/backend from ecpg/lib, ecpg/preproc, libpq and utils Makefiles. Already in CFLAGS... 3. Set MK_NO_LORDER and RANLIB in Makefile.aix to avoid a couple of extra steps taken care of by the 'ld' command anyways.
66 lines
1.7 KiB
Makefile
66 lines
1.7 KiB
Makefile
SRCDIR= ../../..
|
|
include $(SRCDIR)/Makefile.global
|
|
|
|
PQ_INCLUDE=-I$(SRCDIR)/interfaces/libpq
|
|
|
|
SO_MAJOR_VERSION=1
|
|
SO_MINOR_VERSION=0
|
|
|
|
PORTNAME=@PORTNAME@
|
|
|
|
# Shared library stuff
|
|
shlib :=
|
|
install-shlib-dep :=
|
|
ifeq ($(PORTNAME), linux)
|
|
ifdef LINUX_ELF
|
|
install-shlib-dep := install-shlib
|
|
shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
|
|
LDFLAGS_SL = -shared
|
|
CFLAGS += $(CFLAGS_SL)
|
|
endif
|
|
endif
|
|
ifeq ($(PORTNAME), bsd)
|
|
install-shlib-dep := install-shlib
|
|
shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
|
|
LDFLAGS_SL = -x -Bshareable -Bforcearchive
|
|
CFLAGS += $(CFLAGS_SL)
|
|
endif
|
|
#ifeq ($(PORTNAME), i386_solaris)
|
|
# install-shlib-dep := install-shlib
|
|
# shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
|
|
# LDFLAGS_SL = -G -z text
|
|
# CFLAGS += $(CFLAGS_SL)
|
|
#endif
|
|
ifeq ($(PORTNAME), univel)
|
|
install-shlib-dep := install-shlib
|
|
shlib := libecpg.so.1
|
|
LDFLAGS_SL = -G -z text
|
|
CFLAGS += $(CFLAGS_SL)
|
|
endif
|
|
|
|
all: libecpg.a $(shlib)
|
|
|
|
$(shlib): ecpglib.o typename.o
|
|
$(LD) $(LDFLAGS_SL) -o $@ ecpglib.o typename.o
|
|
ln -sf $@ libecpg.so
|
|
|
|
clean:
|
|
rm -f *.o *.a core a.out *~ $(shlib) libecpg.so
|
|
|
|
install: libecpg.a $(shlib) $(install-shlib-dep)
|
|
$(INSTALL) $(INSTLOPTS) libecpg.a $(DESTDIR)$(LIBDIR)
|
|
|
|
install-shlib:
|
|
$(INSTALL) $(INSTLOPTS) $(shlib) $(DESTDIR)$(LIBDIR)
|
|
ln -sf $(shlib) $(DESTDIR)$(LIBDIR)/libecpg.so
|
|
|
|
uninstall::
|
|
rm -f $(DESTDIR)$(LIBDIR)/libecpg.a $(DESTDIR)$(LIBDIR)/$(shlib)
|
|
|
|
# Rules that do something
|
|
libecpg.a : libecpg.a(ecpglib.o) libecpg.a(typename.o)
|
|
|
|
ecpglib.o : ecpglib.c ../include/ecpglib.h ../include/ecpgtype.h
|
|
$(CC) -I../include $(PQ_INCLUDE) -c ecpglib.c
|
|
typename.o : typename.c ../include/ecpgtype.h
|
|
$(CC) -I../include $(PQ_INCLUDE) -c typename.c
|