diff --git a/Makefile b/Makefile index 6d39c79..fa17a5e 100644 --- a/Makefile +++ b/Makefile @@ -63,6 +63,7 @@ dist: $(PACKAGE)-$(VERSION)/tests/binary/project.conf \ $(PACKAGE)-$(VERSION)/tests/binary/Makefile.Darwin \ $(PACKAGE)-$(VERSION)/tests/binary/Makefile.NetBSD \ + $(PACKAGE)-$(VERSION)/tests/binary/Makefile.Windows \ $(PACKAGE)-$(VERSION)/tests/library/project.conf \ $(PACKAGE)-$(VERSION)/tests/library/Makefile.Darwin \ $(PACKAGE)-$(VERSION)/tests/library/Makefile.NetBSD \ diff --git a/tests/Makefile b/tests/Makefile index ea057ab..0e2624e 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -10,7 +10,7 @@ INSTALL = install all: $(TARGETS) -$(OBJDIR)tests.log: binary/project.conf binary/Makefile.Darwin binary/Makefile.NetBSD library/project.conf library/Makefile.Darwin library/Makefile.NetBSD plugin/Makefile.Darwin plugin/Makefile.NetBSD tests.sh +$(OBJDIR)tests.log: binary/project.conf binary/Makefile.Darwin binary/Makefile.NetBSD binary/Makefile.Windows library/project.conf library/Makefile.Darwin library/Makefile.NetBSD plugin/Makefile.Darwin plugin/Makefile.NetBSD tests.sh ./tests.sh -P "$(PREFIX)" -- "$(OBJDIR)tests.log" clean: diff --git a/tests/binary/Makefile.Windows b/tests/binary/Makefile.Windows new file mode 100644 index 0000000..f407cab --- /dev/null +++ b/tests/binary/Makefile.Windows @@ -0,0 +1,42 @@ +TARGETS = $(OBJDIR)test$(EXEEXT) +OBJDIR = +PREFIX = /usr/local +DESTDIR = +BINDIR = $(PREFIX)/bin +SBINDIR = $(PREFIX)/sbin +EXEEXT = .exe +RM = rm -f +LN = ln -f +MKDIR = mkdir -m 0755 -p +INSTALL = install + + +all: $(TARGETS) + +test_OBJS = $(OBJDIR)test.o $(OBJDIR)main.o +test_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) +test_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) + +$(OBJDIR)test$(EXEEXT): $(test_OBJS) + $(CC) -o $(OBJDIR)test$(EXEEXT) $(test_OBJS) $(test_LDFLAGS) + +$(OBJDIR)test.o: test.c + $(CC) $(test_CFLAGS) -o $(OBJDIR)test.o -c test.c + +$(OBJDIR)main.o: main.c + $(CC) $(test_CFLAGS) -o $(OBJDIR)main.o -c main.c + +clean: + $(RM) -- $(test_OBJS) + +distclean: clean + $(RM) -- $(TARGETS) + +install: $(TARGETS) + $(MKDIR) $(DESTDIR)$(BINDIR) + $(INSTALL) -m 0755 $(OBJDIR)test$(EXEEXT) $(DESTDIR)$(BINDIR)/test$(EXEEXT) + +uninstall: + $(RM) -- $(DESTDIR)$(BINDIR)/test$(EXEEXT) + +.PHONY: all clean distclean install uninstall diff --git a/tests/project.conf b/tests/project.conf index 135ecd8..b3ee7ad 100644 --- a/tests/project.conf +++ b/tests/project.conf @@ -1,7 +1,7 @@ targets=tests.log -dist=Makefile,tests.sh,binary/project.conf,binary/Makefile.Darwin,binary/Makefile.NetBSD,library/project.conf,library/Makefile.Darwin,library/Makefile.NetBSD,plugin/project.conf,plugin/Makefile.Darwin,plugin/Makefile.NetBSD +dist=Makefile,tests.sh,binary/project.conf,binary/Makefile.Darwin,binary/Makefile.NetBSD,binary/Makefile.Windows,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=binary/project.conf,binary/Makefile.Darwin,binary/Makefile.NetBSD,library/project.conf,library/Makefile.Darwin,library/Makefile.NetBSD,plugin/Makefile.Darwin,plugin/Makefile.NetBSD,tests.sh +depends=binary/project.conf,binary/Makefile.Darwin,binary/Makefile.NetBSD,binary/Makefile.Windows,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 332c6e5..96c2f17 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -101,4 +101,5 @@ _test "Darwin" "library" _test "Darwin" "plugin" _test "NetBSD" "binary" _test "NetBSD" "library" -_test "NetBSD" "plugin") > "$target" +_test "NetBSD" "plugin" +_fail "Windows" "binary") > "$target"