Add "make install".
FossilOrigin-Name: 58715a7dc63d40149f085a5922893964e5031050eb065fb34179e49b9c68c9e9
This commit is contained in:
parent
dbfce3528e
commit
ea146aea92
1 changed files with 32 additions and 5 deletions
37
Makefile
37
Makefile
|
@ -1,30 +1,57 @@
|
||||||
|
LIB = objpgsql
|
||||||
|
LIB_MAJOR = 0
|
||||||
|
LIB_MINOR = 0
|
||||||
|
|
||||||
SRCS = PGConnection.m \
|
SRCS = PGConnection.m \
|
||||||
PGResult.m \
|
PGResult.m \
|
||||||
PGResultRow.m \
|
PGResultRow.m \
|
||||||
exceptions/PGCommandFailedException.m \
|
exceptions/PGCommandFailedException.m \
|
||||||
exceptions/PGConnectionFailedException.m \
|
exceptions/PGConnectionFailedException.m \
|
||||||
exceptions/PGException.m
|
exceptions/PGException.m
|
||||||
|
HEADERS = ${SRCS:.m=.h}
|
||||||
|
|
||||||
|
CPPFLAGS += -Wall -Iexceptions -I.
|
||||||
|
LIBS += -lpq
|
||||||
|
|
||||||
|
prefix ?= /usr/local
|
||||||
|
|
||||||
|
INSTALL ?= install
|
||||||
|
OBJFW_CONFIG ?= objfw-config
|
||||||
|
OBJFW_COMPILE ?= objfw-compile
|
||||||
|
|
||||||
|
LIB_PREFIX = `${OBJFW_CONFIG} --lib-prefix`
|
||||||
|
LIB_SUFFIX = `${OBJFW_CONFIG} --lib-suffix`
|
||||||
|
LIB_FILE = ${LIB_PREFIX}${LIB}${LIB_SUFFIX}
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@objfw-compile \
|
@objfw-compile \
|
||||||
--lib 0.0 \
|
--lib 0.0 \
|
||||||
-o objpgsql \
|
-o objpgsql \
|
||||||
--builddir build \
|
--builddir build \
|
||||||
-Iexceptions \
|
${CPPFLAGS} \
|
||||||
-I. \
|
${LIBS} \
|
||||||
-lpq \
|
|
||||||
${SRCS}
|
${SRCS}
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@objfw-compile \
|
@objfw-compile \
|
||||||
-o test \
|
-o test \
|
||||||
--builddir build \
|
--builddir build \
|
||||||
-Iexceptions \
|
|
||||||
-I. \
|
|
||||||
-L. \
|
-L. \
|
||||||
-lobjpgsql \
|
-lobjpgsql \
|
||||||
|
${CPPFLAGS} \
|
||||||
test.m
|
test.m
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f libobjpgsql.* exceptions/*~ *~
|
rm -f libobjpgsql.* exceptions/*~ *~
|
||||||
rm -fr build
|
rm -fr build
|
||||||
|
|
||||||
|
install:
|
||||||
|
mkdir -p ${destdir}${prefix}/include/ObjPgSQL/exceptions
|
||||||
|
for i in ${HEADERS}; do \
|
||||||
|
${INSTALL} -m 644 $$i \
|
||||||
|
${destdir}${prefix}/include/ObjPgSQL/$$i; \
|
||||||
|
done
|
||||||
|
mkdir -p ${destdir}${prefix}/lib
|
||||||
|
export LIB_MAJOR=${LIB_MAJOR}; \
|
||||||
|
export LIB_MINOR=${LIB_MINOR}; \
|
||||||
|
${INSTALL} -m 755 ${LIB_FILE} ${destdir}${prefix}/lib/${LIB_FILE}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue