-
Notifications
You must be signed in to change notification settings - Fork 39
/
faudio.make
31 lines (23 loc) · 1.2 KB
/
faudio.make
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FAUDIO_SRCS=$(shell $(SRCDIR)/tools/git-updated-files $(SRCDIR)/FNA/lib/FAudio)
define MINGW_TEMPLATE +=
# FAudio
$$(BUILDDIR)/FAudio-$(1)/Makefile: $$(SRCDIR)/FNA/lib/FAudio/CMakeLists.txt $$(SRCDIR)/faudio.make $$(MINGW_DEPS)
$(RM_F) $$(@D)/CMakeCache.txt
mkdir -p $$(@D)
cd $$(@D); CFLAGS="$$(PDB_CFLAGS_$(1))" CXXFLAGS="$$(PDB_CFLAGS_$(1))" LDFLAGS="$$(PDB_LDFLAGS_$(1))" $$(MINGW_ENV) cmake -DCMAKE_TOOLCHAIN_FILE="$$(SRCDIR_ABS)/toolchain-$(1).cmake" -DCMAKE_C_COMPILER=$$(MINGW_$(1))-gcc -DCMAKE_CXX_COMPILER=$$(MINGW_$(1))-g++ -DPLATFORM_WIN32=ON $$(SRCDIR_ABS)/FNA/lib/FAudio
$$(BUILDDIR)/FAudio-$(1)/.built: $$(BUILDDIR)/FAudio-$(1)/Makefile $$(FAUDIO_SRCS) $$(MINGW_DEPS)
+$$(MINGW_ENV) $$(MAKE) -C $$(BUILDDIR)/FAudio-$(1)
touch "$$@"
IMAGEDIR_BUILD_TARGETS += $$(BUILDDIR)/FAudio-$(1)/.built
FAudio-$(1).dll: $$(BUILDDIR)/FAudio-$(1)/.built
mkdir -p "$$(IMAGEDIR)/lib/$(1)"
$$(INSTALL_PE_$(1)) "$$(BUILDDIR)/FAudio-$(1)/FAudio.dll" "$$(IMAGEDIR)/lib/$(1)/FAudio.dll"
.PHONY: FAudio-$(1).dll
imagedir-targets: FAudio-$(1).dll
FAudio.dll: FAudio-$(1).dll
.PHONY: FAudio.dll
clean-build-FAudio-$(1):
rm -rf $$(BUILDDIR)/FAudio-$(1)
.PHONY: clean-build-FAudio-$(1)
clean-build: clean-build-FAudio-$(1)
endef