Build improvements as suggested by Mario Schwalbe

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@44 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
This commit is contained in:
mheily 2009-11-06 00:18:53 +00:00
parent a68a01ca24
commit e49207038b
3 changed files with 7 additions and 21 deletions

View File

@ -24,17 +24,16 @@ include config.mk
build:
gcc $(CFLAGS) -c *.c
rm test.o
ar rcs libkqueue.a *.o
gcc -shared -Wl,-soname,libkqueue.so -o libkqueue.so *.o
install:
$(INSTALL) -d -m 755 $(INCLUDEDIR)/kqueue
$(INSTALL) -d -m 755 $(INCLUDEDIR)/kqueue/sys
$(INSTALL) -d -m 755 $(MANDIR)/man2
$(INSTALL) -m 644 sys/event.h $(INCLUDEDIR)/kqueue/sys/event.h
$(INSTALL) -m 644 libkqueue.so $(LIBDIR)/libkqueue.so
$(INSTALL) -d -m 755 $(LIBDIR)/pkgconfig
$(INSTALL) -m 644 libkqueue.pc $(LIBDIR)/pkgconfig
$(INSTALL) -d -m 755 $(MANDIR)/man2
$(INSTALL) -m 644 kqueue.2 $(MANDIR)/man2/kqueue.2
$(INSTALL) -m 644 kqueue.2 $(MANDIR)/man2/kevent.2

10
configure vendored
View File

@ -66,14 +66,14 @@ echo "Checking operating system type... $target"
rm -f socket.c vnode.c signal.c timer.c user.c
if [ $target = "linux" ] ; then
check_header sys/epoll.h && ln -s os/linux/socket.c \
|| ln -s os/posix/socket.c
|| ln -sf os/posix/socket.c
check_header sys/inotify.h && ln -s os/linux/vnode.c \
|| ln -s os/posix/vnode.c
|| ln -sf os/posix/vnode.c
check_header sys/signalfd.h && ln -s os/linux/signal.c \
|| ln -s os/posix/signal.c
|| ln -sf os/posix/signal.c
check_header sys/timerfd.h && ln -s os/linux/timer.c \
|| ln -s os/posix/timer.c
ln -s os/posix/user.c
|| ln -sf os/posix/timer.c
ln -sf os/posix/user.c
fi
echo "Creating config.h"

View File

@ -1,13 +0,0 @@
/* AUTOMATICALLY GENERATED -- DO NOT EDIT */
#define PROGRAM "libkqueue-test"
#define VERSION "0.1"
#define TARGET "openbsd"
#define PREFIX "/usr/local"
#define LIBDIR "/usr/local/lib"
#define INCLUDEDIR "/usr/local/include"
#define MANDIR "/usr/local/share/man"
#define HAVE_SYS_EVENT_H
#undef HAVE_EVFILT_DISPATCH
#undef HAVE_EVFILT_RECEIPT
#define CFLAGS "-g -O0 -Wall -Werror"
#define LDADD ""