Added a test for libraries on MacOS X (Darwin)
This commit is contained in:
parent
6e2694fce2
commit
716d5c6a87
1
Makefile
1
Makefile
@ -60,6 +60,7 @@ dist:
|
|||||||
$(PACKAGE)-$(VERSION)/tests/Makefile \
|
$(PACKAGE)-$(VERSION)/tests/Makefile \
|
||||||
$(PACKAGE)-$(VERSION)/tests/tests.sh \
|
$(PACKAGE)-$(VERSION)/tests/tests.sh \
|
||||||
$(PACKAGE)-$(VERSION)/tests/library/project.conf \
|
$(PACKAGE)-$(VERSION)/tests/library/project.conf \
|
||||||
|
$(PACKAGE)-$(VERSION)/tests/library/Makefile.Darwin \
|
||||||
$(PACKAGE)-$(VERSION)/tests/library/Makefile.NetBSD \
|
$(PACKAGE)-$(VERSION)/tests/library/Makefile.NetBSD \
|
||||||
$(PACKAGE)-$(VERSION)/tests/project.conf \
|
$(PACKAGE)-$(VERSION)/tests/project.conf \
|
||||||
$(PACKAGE)-$(VERSION)/tools/pkg-config.c \
|
$(PACKAGE)-$(VERSION)/tools/pkg-config.c \
|
||||||
|
@ -9,7 +9,7 @@ INSTALL = install
|
|||||||
|
|
||||||
all: $(TARGETS)
|
all: $(TARGETS)
|
||||||
|
|
||||||
tests.log: ../src/configure library/project.conf library/Makefile.NetBSD tests.sh
|
tests.log: ../src/configure library/project.conf library/Makefile.Darwin library/Makefile.NetBSD tests.sh
|
||||||
./tests.sh -P "$(PREFIX)" -- "tests.log"
|
./tests.sh -P "$(PREFIX)" -- "tests.log"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
42
tests/library/Makefile.Darwin
Normal file
42
tests/library/Makefile.Darwin
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
TARGETS = libtest.a libtest.dylib.0.0 libtest.dylib.0 libtest.dylib
|
||||||
|
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)
|
||||||
|
|
||||||
|
libtest_OBJS = test.o
|
||||||
|
libtest_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
|
||||||
|
libtest_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
|
||||||
|
|
||||||
|
libtest.a: $(libtest_OBJS)
|
||||||
|
$(AR) -rc libtest.a $(libtest_OBJS)
|
||||||
|
$(RANLIB) libtest.a
|
||||||
|
|
||||||
|
libtest.dylib.0.0 libtest.dylib.0 libtest.dylib: $(libtest_OBJS)
|
||||||
|
$(CCSHARED) -o libtest.dylib.0.0 $(libtest_OBJS) $(libtest_LDFLAGS)
|
||||||
|
$(LN) -s -- libtest.dylib.0.0 libtest.dylib.0
|
||||||
|
$(LN) -s -- libtest.dylib.0.0 libtest.dylib
|
||||||
|
|
||||||
|
test.o: test.c
|
||||||
|
$(CC) $(libtest_CFLAGS) -c test.c
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(RM) -- $(libtest_OBJS)
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
$(RM) -- $(TARGETS)
|
||||||
|
|
||||||
|
install: $(TARGETS)
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
|
||||||
|
.PHONY: all clean distclean install uninstall
|
@ -1,7 +1,7 @@
|
|||||||
targets=tests.log
|
targets=tests.log
|
||||||
dist=Makefile,tests.sh,library/project.conf,library/Makefile.NetBSD
|
dist=Makefile,tests.sh,library/project.conf,library/Makefile.Darwin,library/Makefile.NetBSD
|
||||||
|
|
||||||
[tests.log]
|
[tests.log]
|
||||||
type=script
|
type=script
|
||||||
script=./tests.sh
|
script=./tests.sh
|
||||||
depends=../src/configure,library/project.conf,library/Makefile.NetBSD,tests.sh
|
depends=../src/configure,library/project.conf,library/Makefile.Darwin,library/Makefile.NetBSD,tests.sh
|
||||||
|
@ -87,4 +87,5 @@ fi
|
|||||||
target="$1"
|
target="$1"
|
||||||
($DATE
|
($DATE
|
||||||
echo
|
echo
|
||||||
|
_test "Darwin" "library"
|
||||||
_test "NetBSD" "library") > "$target"
|
_test "NetBSD" "library") > "$target"
|
||||||
|
Loading…
Reference in New Issue
Block a user