diff --git a/Makefile b/Makefile index 2e8dcd3..1dc9a9c 100644 --- a/Makefile +++ b/Makefile @@ -62,6 +62,9 @@ dist: $(PACKAGE)-$(VERSION)/tests/library/project.conf \ $(PACKAGE)-$(VERSION)/tests/library/Makefile.Darwin \ $(PACKAGE)-$(VERSION)/tests/library/Makefile.NetBSD \ + $(PACKAGE)-$(VERSION)/tests/plugin/project.conf \ + $(PACKAGE)-$(VERSION)/tests/plugin/Makefile.Darwin \ + $(PACKAGE)-$(VERSION)/tests/plugin/Makefile.NetBSD \ $(PACKAGE)-$(VERSION)/tests/project.conf \ $(PACKAGE)-$(VERSION)/tools/pkg-config.c \ $(PACKAGE)-$(VERSION)/tools/Makefile \ diff --git a/tests/Makefile b/tests/Makefile index 5a52dc5..aebb8ff 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -9,7 +9,7 @@ INSTALL = install all: $(TARGETS) -tests.log: ../src/configure library/project.conf library/Makefile.Darwin library/Makefile.NetBSD tests.sh +tests.log: ../src/configure library/project.conf library/Makefile.Darwin library/Makefile.NetBSD plugin/Makefile.Darwin plugin/Makefile.NetBSD tests.sh ./tests.sh -P "$(PREFIX)" -- "tests.log" clean: diff --git a/tests/plugin/Makefile.Darwin b/tests/plugin/Makefile.Darwin new file mode 100644 index 0000000..5a41d1e --- /dev/null +++ b/tests/plugin/Makefile.Darwin @@ -0,0 +1,39 @@ +TARGETS = test.dylib +PREFIX = /usr/local +DESTDIR = +LIBDIR = $(PREFIX)/lib +AR = ar +RANLIB = ranlib +CCSHARED= $(CC) -dynamiclib +RM = rm -f +LN = ln -f +MKDIR = mkdir -m 0755 -p +INSTALL = install + + +all: $(TARGETS) + +test_OBJS = test.o +test_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) +test_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) + +test.dylib: $(test_OBJS) + $(CCSHARED) -o test.dylib $(test_OBJS) $(test_LDFLAGS) + +test.o: test.c + $(CC) $(test_CFLAGS) -c test.c + +clean: + $(RM) -- $(test_OBJS) + +distclean: clean + $(RM) -- $(TARGETS) + +install: $(TARGETS) + $(MKDIR) $(DESTDIR)$(LIBDIR)/configure + $(INSTALL) -m 0755 test.dylib $(DESTDIR)$(LIBDIR)/configure/test.dylib + +uninstall: + $(RM) -- $(DESTDIR)$(LIBDIR)/configure/test.dylib + +.PHONY: all clean distclean install uninstall diff --git a/tests/plugin/Makefile.NetBSD b/tests/plugin/Makefile.NetBSD new file mode 100644 index 0000000..f713171 --- /dev/null +++ b/tests/plugin/Makefile.NetBSD @@ -0,0 +1,39 @@ +TARGETS = test.so +PREFIX = /usr/local +DESTDIR = +LIBDIR = $(PREFIX)/lib +AR = ar +RANLIB = ranlib +CCSHARED= $(CC) -shared +RM = rm -f +LN = ln -f +MKDIR = mkdir -m 0755 -p +INSTALL = install + + +all: $(TARGETS) + +test_OBJS = test.o +test_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) +test_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) + +test.so: $(test_OBJS) + $(CCSHARED) -o test.so $(test_OBJS) $(test_LDFLAGS) + +test.o: test.c + $(CC) $(test_CFLAGS) -c test.c + +clean: + $(RM) -- $(test_OBJS) + +distclean: clean + $(RM) -- $(TARGETS) + +install: $(TARGETS) + $(MKDIR) $(DESTDIR)$(LIBDIR)/configure + $(INSTALL) -m 0755 test.so $(DESTDIR)$(LIBDIR)/configure/test.so + +uninstall: + $(RM) -- $(DESTDIR)$(LIBDIR)/configure/test.so + +.PHONY: all clean distclean install uninstall diff --git a/tests/plugin/project.conf b/tests/plugin/project.conf new file mode 100644 index 0000000..ee7e93e --- /dev/null +++ b/tests/plugin/project.conf @@ -0,0 +1,7 @@ +targets=test +dist=Makefile + +[test] +type=plugin +sources=test.c +install=$(LIBDIR)/configure diff --git a/tests/project.conf b/tests/project.conf index 72afbb5..54b8e14 100644 --- a/tests/project.conf +++ b/tests/project.conf @@ -1,7 +1,7 @@ targets=tests.log -dist=Makefile,tests.sh,library/project.conf,library/Makefile.Darwin,library/Makefile.NetBSD +dist=Makefile,tests.sh,library/project.conf,library/Makefile.Darwin,library/Makefile.NetBSD,plugin/project.conf,plugin/Makefile.Darwin,plugin/Makefile.NetBSD [tests.log] type=script script=./tests.sh -depends=../src/configure,library/project.conf,library/Makefile.Darwin,library/Makefile.NetBSD,tests.sh +depends=../src/configure,library/project.conf,library/Makefile.Darwin,library/Makefile.NetBSD,plugin/Makefile.Darwin,plugin/Makefile.NetBSD,tests.sh diff --git a/tests/tests.sh b/tests/tests.sh index 401c096..1df2678 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -96,4 +96,6 @@ fi target="$1" ($DATE _fail "Darwin" "library" -_test "NetBSD" "library") > "$target" +_test "NetBSD" "library" +_test "Darwin" "plugin" +_test "NetBSD" "plugin") > "$target"