Allow things to compile (and hopfully work on Linux)
This commit is contained in:
parent
8ab4673bd5
commit
f6b52a4b4b
3
Makefile
3
Makefile
|
@ -1,3 +1,4 @@
|
|||
SUBDIR= psqldbadm psqluseradm
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
all:
|
||||
for dir in ${SUBDIR}; do (cd $$dir; make); done
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#include <string.h>
|
||||
|
||||
char *
|
||||
strlcpy(char *dest, char *src, size_t n)
|
||||
{
|
||||
char *p;
|
||||
|
||||
p = strncpy(dest, src, n);
|
||||
dest[n-1] = '\0';
|
||||
|
||||
return p;
|
||||
}
|
|
@ -1,13 +1,11 @@
|
|||
.PATH: ${.CURDIR} ${.CURDIR}/../psqluseradm/
|
||||
#.PATH: .:../psqluseradm/
|
||||
|
||||
CFLAGS= -I/usr/local/include
|
||||
LDFLAGS=-L/usr/local/lib -lpq
|
||||
CFLAGS= -I`pg_config --includedir`
|
||||
LDFLAGS=-lpq
|
||||
|
||||
PROG= psql-dbadm
|
||||
SRCS= psql-dbadm.c psqladm.c
|
||||
OBJS= psql-dbadm.o ../psqluseradm/psqladm.o ../misc.o
|
||||
|
||||
NO_MAN= true
|
||||
${PROG}: ${OBJS}
|
||||
gcc -o ${PROG} ${OBJS} ${LDFLAGS}
|
||||
|
||||
WARNS?= 6
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
CFLAGS= -I/usr/local/include
|
||||
LDFLAGS=-L/usr/local/lib -lpq
|
||||
CFLAGS= -I`pg_config --includedir`
|
||||
LDFLAGS=-lpq
|
||||
|
||||
PROG= psql-useradm
|
||||
SRCS= psql-useradm.c psqladm.c
|
||||
OBJS= psql-useradm.o psqladm.o ../misc.o
|
||||
|
||||
NO_MAN= true
|
||||
${PROG}: ${OBJS}
|
||||
gcc -o ${PROG} ${OBJS} ${LDFLAGS}
|
||||
|
||||
WARNS?= 6
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
|
Reference in New Issue