source: Makefile @ 430fc3

Revision 430fc3, 1.2 KB checked in by Erik Ekman <yarrick@…>, 9 years ago (diff)

Make crosscompiling easier

  • 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
25install: all
26        $(MKDIR) $(MKDIR_FLAGS) $(DESTDIR)$(sbindir)
27        $(INSTALL) $(INSTALL_FLAGS) bin/iodine $(DESTDIR)$(sbindir)/iodine
28        chmod 755 $(DESTDIR)$(sbindir)/iodine
29        $(INSTALL) $(INSTALL_FLAGS) bin/iodined $(DESTDIR)$(sbindir)/iodined
30        chmod 755 $(DESTDIR)$(sbindir)/iodined
31        $(MKDIR) $(MKDIR_FLAGS) $(DESTDIR)$(mandir)/man8
32        $(INSTALL) $(INSTALL_FLAGS) man/iodine.8 $(DESTDIR)$(mandir)/man8/iodine.8
33        chmod 644 $(DESTDIR)$(mandir)/man8/iodine.8
34
35uninstall:
36        $(RM) $(RM_FLAGS) $(DESTDIR)$(sbindir)/iodine
37        $(RM) $(RM_FLAGS) $(DESTDIR)$(sbindir)/iodined
38        $(RM) $(RM_FLAGS) $(DESTDIR)$(mandir)/man8/iodine.8
39       
40test: all
41        @echo "!! The check library is required for compiling and running the tests"
42        @echo "!! Get it at http://check.sf.net"
43        @(cd tests; $(MAKE) TARGETOS=$(TARGETOS) all)
44
45clean:
46        @echo "Cleaning..."
47        @(cd src; $(MAKE) clean)
48        @(cd tests; $(MAKE) clean)
49        @rm -rf bin
50
Note: See TracBrowser for help on using the repository browser.