Added version number to package folder (allow different versions of a package)
[fltk_mvc_template.git] / _template / packages / libao1.2.2 / Makefile
1 ############################################################################
2 # Workfile: Makefile
3 # Author: Daniel Giritzer, S1810567004 (daniel@giritzer.eu)
4 # Date: 03.12.2018
5 # Description: Universal Makefile for Unix based Operating Systems
6 # For Linux please use libao of your distribution!
7 ############################################################################
8 WORKDIR = $(shell pwd)
9
10 all: unpack windows
11
12 .PHONY: unpack
13 unpack:
14         tar xvzf libao-1.2.2.tar.gz
15
16 .PHONY: windows
17 windows:
18         cd $(WORKDIR)/libao-1.2.2; \
19         ./autogen.sh; \
20         ./configure CFLAGS="-m32 -static -mconsole" CXXFLAGS="-static -m32 -mconsole" LDFLAGS="-m32 -static -static-libgcc -static-libstdc++ -lpthread" --enable-static --disable-pulse --disable-alsa --disable-alsa-mmap --enable-wmm --host=i686-w64-mingw32; \
21         make -j4
22         mkdir -p $(WORKDIR)/../../include
23         mkdir -p $(WORKDIR)/../../lib/mingw32
24         cp -rf $(WORKDIR)/libao-1.2.2/include/ao $(WORKDIR)/../../include
25         cp -rf $(WORKDIR)/libao-1.2.2/src/.libs/libao.a $(WORKDIR)/../../lib/mingw32
26
27 .PHONY: linux_dont_build_me
28 linux_dont_build_me:
29         cd $(WORKDIR)/libao-1.2.2; \
30         ./autogen.sh; \
31         ./configure CFLAGS='-m32 -static -static-libgcc -static-libstdc++' --enable-static --enable-pulse --enable-alsa --enable-alsa-mmap; \
32         sed -i -e 's/@HAVE_ALSA_TRUE@//g' $(WORKDIR)/libao-1.2.2/src/plugins/alsa/Makefile.in; \
33         sed -i -e 's/@HAVE_ALSA_FALSE@//g' $(WORKDIR)/libao-1.2.2/src/plugins/alsa/Makefile.in; \
34         make -j4
35         mkdir -p $(WORKDIR)/../../include
36         mkdir -p $(WORKDIR)/../../lib/linux32
37         cp -rf $(WORKDIR)/libao-1.2.2/include/ao $(WORKDIR)/../../include
38         cp -rf $(WORKDIR)/libao-1.2.2/src/.libs/libao.a $(WORKDIR)/../../lib/linux32
39         cp -rf $(WORKDIR)/libao-1.2.2/src/plugins/pulse/.libs/libpulse.a $(WORKDIR)/../../lib/linux32
40         cp -rf $(WORKDIR)/libao-1.2.2/src/plugins/alsa/.libs/libalsa.a $(WORKDIR)/../../lib/linux32
41
42 .PHONY: clean
43 clean:
44         rm -rf $(WORKDIR)/libao-1.2.2;