source: Makefile @ 22608b

Revision 22608b, 1.7 KB checked in by Erik Ekman <yarrick@…>, 9 years ago (diff)

give error when no TAP adapters found, and clean better

  • Property mode set to 100644
Line 
1prefix=/usr/local
2sbindir=$(prefix)/sbin
3datadir=$(prefix)/share
4mandir=$(datadir)/man
5
6DESTDIR=
7
8INSTALL=install
9INSTALL_FLAGS=
10
11MKDIR=mkdir
12MKDIR_FLAGS=-p
13
14RM=rm
15RM_FLAGS=-f
16
17TARGETOS = `uname`
18
19all:
20        @(cd src; $(MAKE) TARGETOS=$(TARGETOS) all)
21
22cross-mingw:
23        @(cd src; $(MAKE) TARGETOS=windows32 CC=i686-mingw32-gcc all)
24
25cross-mingw-dist: cross-mingw
26        @rm -rf iodine-latest-win32*
27        @mkdir -p iodine-latest-win32/bin
28        @for i in `ls bin`; do cp bin/$$i iodine-latest-win32/bin/$$i.exe; done
29        @cp /usr/i686-mingw32/usr/bin/zlib1.dll iodine-latest-win32/bin
30        @cp README* CH* TO* iodine-latest-win32
31        @echo "Create date: " > iodine-latest-win32/VERSION
32        @date >> iodine-latest-win32/VERSION
33        @echo "SVN version: " >> iodine-latest-win32/VERSION
34        @svnversion >> iodine-latest-win32/VERSION
35        @zip -r iodine-latest-win32.zip iodine-latest-win32
36
37install: all
38        $(MKDIR) $(MKDIR_FLAGS) $(DESTDIR)$(sbindir)
39        $(INSTALL) $(INSTALL_FLAGS) bin/iodine $(DESTDIR)$(sbindir)/iodine
40        chmod 755 $(DESTDIR)$(sbindir)/iodine
41        $(INSTALL) $(INSTALL_FLAGS) bin/iodined $(DESTDIR)$(sbindir)/iodined
42        chmod 755 $(DESTDIR)$(sbindir)/iodined
43        $(MKDIR) $(MKDIR_FLAGS) $(DESTDIR)$(mandir)/man8
44        $(INSTALL) $(INSTALL_FLAGS) man/iodine.8 $(DESTDIR)$(mandir)/man8/iodine.8
45        chmod 644 $(DESTDIR)$(mandir)/man8/iodine.8
46
47uninstall:
48        $(RM) $(RM_FLAGS) $(DESTDIR)$(sbindir)/iodine
49        $(RM) $(RM_FLAGS) $(DESTDIR)$(sbindir)/iodined
50        $(RM) $(RM_FLAGS) $(DESTDIR)$(mandir)/man8/iodine.8
51       
52test: all
53        @echo "!! The check library is required for compiling and running the tests"
54        @echo "!! Get it at http://check.sf.net"
55        @(cd tests; $(MAKE) TARGETOS=$(TARGETOS) all)
56
57clean:
58        @echo "Cleaning..."
59        @(cd src; $(MAKE) clean)
60        @(cd tests; $(MAKE) clean)
61        @rm -rf bin iodine-latest-win32*
62
Note: See TracBrowser for help on using the repository browser.