1 1.8 christos # $NetBSD: Makefile,v 1.8 2016/10/04 14:25:02 christos Exp $ 2 1.1 joerg 3 1.1 joerg LIB= sqlite3 4 1.1 joerg INCS= sqlite3.h sqlite3ext.h 5 1.1 joerg INCSDIR= /usr/include 6 1.1 joerg 7 1.1 joerg SRCS= sqlite3.c 8 1.1 joerg 9 1.1 joerg CFLAGS+= -DNDEBUG 10 1.1 joerg 11 1.1 joerg FILES+= sqlite3.pc 12 1.1 joerg FILESOWN_sqlite3.pc= ${BINOWN} 13 1.1 joerg FILESGRP_sqlite3.pc= ${BINGRP} 14 1.1 joerg FILESMODE_sqlite3.pc= ${NONBINMODE} 15 1.1 joerg FILESDIR_sqlite3.pc= /usr/lib/pkgconfig 16 1.1 joerg 17 1.4 christos CLEANFILES+=sqlite3.pc 18 1.4 christos 19 1.7 mrg .include <bsd.own.mk> 20 1.7 mrg 21 1.7 mrg .if ${MACHINE_CPU} == "m68k" 22 1.7 mrg CWARNFLAGS+= -Wa,--warn 23 1.7 mrg .endif 24 1.7 mrg 25 1.8 christos .if ${MACHINE_ARCH} == "powerpc64" 26 1.8 christos # call to `' lacks nop, can't restore toc; recompile with -fPIC 27 1.8 christos COPTS.sqlite3.c += -O0 28 1.8 christos .endif 29 1.8 christos 30 1.1 joerg .include <bsd.lib.mk> 31 1.4 christos 32 1.5 dsl all: sqlite3.pc 33 1.5 dsl dependall: all 34 1.5 dsl 35 1.4 christos sqlite3.pc: ${SRCDIR}/sqlite3.h sqlite3.pc.in 36 1.4 christos @(V=$$( (echo '#include <sqlite3.h>'; echo SQLITE_VERSION) | \ 37 1.6 christos ${HOST_CC} -E -I${SRCDIR} - | tail -1 | tr -d '"') && \ 38 1.4 christos ${TOOL_SED} -e s/@VERSION@/$$V/ < ${.CURDIR}/sqlite3.pc.in \ 39 1.4 christos > ${.TARGET}) 40