source: trunk/Apps/Graphics/Sources/xynth/Makefile @ 321

Last change on this file since 321 was 321, checked in by khorben, 11 years ago

Compile with -fPIC

File size: 1.6 KB
Line 
1PACKAGE = xynth
2VERSION = 0.8.90
3DESTDIR =
4PREFIX  = /usr/local
5TARGETS = $(PACKAGE)-$(VERSION)/src/server/xynth
6HOST    = `uname -m | tr A-Z a-z`--`uname -s | tr A-Z a-z`
7CPPFLAGS= -nostdinc -isystem $(DESTDIR)$(PREFIX)/include
8CFLAGS  = -ffreestanding
9LDFLAGS = -nostdlib -fPIC -L$(DESTDIR)$(PREFIX)/lib -Wl,-rpath-link,$(DESTDIR)$(PREFIX)/lib -Wl,-lc -Wl,-lm -Wl,-lpthread -Wl,-lsocket -Wl,-lgetopt -Wl,-lgcc -Wl,$(DESTDIR)$(PREFIX)/lib/start.o
10FETCH   = wget --continue
11RM      = rm -f
12TAR     = tar
13TOUCH   = touch
14ARCHIVE = $(PACKAGE)-$(VERSION).tar.bz2
15MIRROR  = http://puzzle.dl.sourceforge.net/sourceforge/$(PACKAGE)
16URL     = $(MIRROR)/$(ARCHIVE)
17
18all: $(TARGETS)
19
20configure: .configure-done
21
22download: .download-done
23
24extract: .extract-done
25
26install: $(TARGETS)
27        (cd $(PACKAGE)-$(VERSION) && $(MAKE) V=1 _INSTALLDIR="$(DESTDIR)$(PREFIX)" $@)
28
29patch: .patch-done
30
31uninstall:
32        (cd $(PACKAGE)-$(VERSION) && $(MAKE) $@)
33
34clean:
35        if [ -f $(PACKAGE)-$(VERSION)/Makefile ]; then \
36                (cd $(PACKAGE)-$(VERSION) && $(MAKE) $@); \
37        fi
38
39distclean:
40        $(RM) .configure-done .download-done .extract-done .patch-done
41        $(RM) -r $(PACKAGE)-$(VERSION)
42
43.download-done:
44        $(FETCH) $(URL)
45        $(TOUCH) $@
46
47.extract-done: .download-done
48        $(TAR) -xjvf $(ARCHIVE)
49        $(TOUCH) $@
50
51.patch-done: .extract-done
52        for i in patches/*; do \
53                [ -f "$$i" ] && patch -p0 < "$$i"; \
54        done; \
55        $(TOUCH) $@
56
57.configure-done: .patch-done
58        $(TOUCH) $@
59
60$(PACKAGE)-$(VERSION)/src/server/xynth: .configure-done
61        (cd $(PACKAGE)-$(VERSION) && $(MAKE) V=1 CC="$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)" _INSTALLDIR="$(PREFIX)")
62
63.PHONY: all clean configure distclean download extract install patch uninstall
Note: See TracBrowser for help on using the repository browser.