spu: get rid of iXAPitch
[pcsx_rearmed.git] / deps / mman / Makefile
CommitLineData
81c4586f
PC
1#
2# mman-win32 (mingw32) Makefile
3#
4include config.mak
5
6CFLAGS=-Wall -O3 -fomit-frame-pointer
7
8ifeq ($(BUILD_STATIC),yes)
9 TARGETS+=libmman.a
10 INSTALL+=static-install
11endif
12
13ifeq ($(BUILD_SHARED),yes)
14 TARGETS+=libmman.dll
15 INSTALL+=shared-install
16 CFLAGS+=-DMMAN_LIBRARY_DLL -DMMAN_LIBRARY
17endif
18
19ifeq ($(BUILD_MSVC),yes)
20 SHFLAGS+=-Wl,--output-def,libmman.def
21 INSTALL+=lib-install
22endif
23
24all: $(TARGETS)
25
26mman.o: mman.c mman.h
27 $(CC) -o mman.o -c mman.c $(CFLAGS)
28
29libmman.a: mman.o
30 $(AR) cru libmman.a mman.o
31 $(RANLIB) libmman.a
32
33libmman.dll: mman.o
34 $(CC) -shared -o libmman.dll mman.o -Wl,--out-implib,libmman.dll.a
35
36header-install:
37 mkdir -p $(DESTDIR)$(incdir)
38 cp mman.h $(DESTDIR)$(incdir)
39
40static-install: header-install
41 mkdir -p $(DESTDIR)$(libdir)
42 cp libmman.a $(DESTDIR)$(libdir)
43
44shared-install: header-install
45 mkdir -p $(DESTDIR)$(libdir)
46 cp libmman.dll.a $(DESTDIR)$(libdir)
47 mkdir -p $(DESTDIR)$(bindir)
48 cp libmman.dll $(DESTDIR)$(bindir)
49
50lib-install:
51 mkdir -p $(DESTDIR)$(libdir)
52 cp libmman.lib $(DESTDIR)$(libdir)
53
54install: $(INSTALL)
55
56test.exe: test.c mman.c mman.h
57 $(CC) -o test.exe test.c -L. -lmman
58
59test: $(TARGETS) test.exe
60 test.exe
61
62clean::
63 rm -f mman.o libmman.a libmman.dll.a libmman.dll libmman.def libmman.lib test.exe *.dat
64
65distclean: clean
66 rm -f config.mak
67
68.PHONY: clean distclean install test