]> git.tdb.fi Git - ext/openal.git/commitdiff
Add MSP build system
authorMikko Rasa <tdb@tdb.fi>
Mon, 11 Sep 2023 20:00:31 +0000 (23:00 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 11 Sep 2023 20:00:31 +0000 (23:00 +0300)
.gitignore
Build [new file with mode: 0644]
config.h [new file with mode: 0644]
version.h [new file with mode: 0644]

index 4a8212b53b575a325e18c8e0409ea15ad3bc875f..b109f7ee65c8ef63492f0cd22ab73a3c21688df5 100644 (file)
@@ -1,4 +1,3 @@
-build*/
 winbuild
 win64build
 
@@ -7,3 +6,10 @@ win64build
 
 ## qt-creator
 CMakeLists.txt.user*
+
+## MSP
+temp/
+/openal.dll
+/openal.lib
+/openal.pdb
+/openal_static.lib
diff --git a/Build b/Build
new file mode 100644 (file)
index 0000000..49614ef
--- /dev/null
+++ b/Build
@@ -0,0 +1,317 @@
+package "openal"
+{
+       if_arch "windows"
+       {
+               feature "winmm" "Enable WinMM backend"
+               {
+                       default "yes";
+               };
+               if_feature "winmm"
+               {
+                       build_info
+                       {
+                               library "winmm";
+                       };
+               };
+
+               feature "dsound" "Enable DirectSound backend"
+               {
+                       default "yes";
+               };
+
+               feature "wasapi" "Enable WASAPI backend"
+               {
+                       default "yes";
+               };
+       };
+
+       feature "wave" "Enable WaveFile backend"
+       {
+               default "yes";
+       };
+
+       build_info
+       {
+               incpath ".";
+               incpath "common";
+               define "HAVE_MALLOC_H" "1";
+               define "HAVE_PTHREAD_SETSCHEDPARAM" "1";
+               define "RESTRICT" " ";
+       };
+
+       if_arch "linux"
+       {
+               define "HAVE_PTHREAD_SETNAME_NP" "1";
+               build_info
+               {
+                       library "dl";
+               };
+       };
+
+       if_arch "windows"
+       {
+               build_info
+               {
+                       define "NOMINMAX" "1";
+                       define "HAVE__ALIGNED_MALLOC" "1";
+                       define "HAVE_INTRIN_H" "1";
+                       define "HAVE_CPUID_INTRINSIC" "1";
+                       define "HAVE_GUIDDEF_H" "1";
+                       define "HAVE_INITGUID_H" "1";
+                       define "AL_API" "__declspec(dllexport)";
+                       define "ALC_API" "__declspec(dllexport)";
+                       library "ole32";
+                       library "shell32";
+                       library "user32";
+               };
+       };
+
+       if_arch "gcc"
+       {
+               build_info
+               {
+                       define "HAVE_CPUID_H" "1";
+                       define "HAVE_GCC_GET_CPUID" "1";
+                       define "AL_API" "__attribute__((visibility(\"default\")))";
+                       define "ALC_API" "__attribute__((visibility(\"default\")))";
+               };
+       };
+
+       if_arch "msvc"
+       {
+               build_info
+               {
+                       fatal_warnings false;
+               };
+       };
+
+       if_arch "!windows"
+       {
+               build_info
+               {
+                       define "HAVE_POSIX_MEMALIGN" "1";
+                       define "HAVE_DLFCN_H" "1";
+               };
+       };
+
+       library "openal"
+       {
+               source "common/albit.h";
+               source "common/albyte.h";
+               source "common/alcomplex.cpp";
+               source "common/alcomplex.h";
+               source "common/aldeque.h";
+               source "common/alfstream.cpp";
+               source "common/alfstream.h";
+               source "common/almalloc.cpp";
+               source "common/almalloc.h";
+               source "common/alnumbers.h";
+               source "common/alnumeric.h";
+               source "common/aloptional.h";
+               source "common/alspan.h";
+               source "common/alstring.cpp";
+               source "common/alstring.h";
+               source "common/altraits.h";
+               source "common/atomic.h";
+               source "common/comptr.h";
+               source "common/dynload.cpp";
+               source "common/dynload.h";
+               source "common/intrusive_ptr.h";
+               source "common/opthelpers.h";
+               source "common/phase_shifter.h";
+               source "common/polyphase_resampler.cpp";
+               source "common/polyphase_resampler.h";
+               source "common/pragmadefs.h";
+               source "common/ringbuffer.cpp";
+               source "common/ringbuffer.h";
+               source "common/strutils.cpp";
+               source "common/strutils.h";
+               source "common/threads.cpp";
+               source "common/threads.h";
+               source "common/vecmat.h";
+               source "common/vector.h";
+
+               source "core/ambdec.cpp";
+               source "core/ambdec.h";
+               source "core/ambidefs.cpp";
+               source "core/ambidefs.h";
+               source "core/async_event.h";
+               source "core/bformatdec.cpp";
+               source "core/bformatdec.h";
+               source "core/bs2b.cpp";
+               source "core/bs2b.h";
+               source "core/bsinc_defs.h";
+               source "core/bsinc_tables.cpp";
+               source "core/bsinc_tables.h";
+               source "core/bufferline.h";
+               source "core/buffer_storage.cpp";
+               source "core/buffer_storage.h";
+               source "core/context.cpp";
+               source "core/context.h";
+               source "core/converter.cpp";
+               source "core/converter.h";
+               source "core/cpu_caps.cpp";
+               source "core/cpu_caps.h";
+               source "core/cubic_defs.h";
+               source "core/cubic_tables.cpp";
+               source "core/cubic_tables.h";
+               source "core/devformat.cpp";
+               source "core/devformat.h";
+               source "core/device.cpp";
+               source "core/device.h";
+               source "core/effects/base.h";
+               source "core/effectslot.cpp";
+               source "core/effectslot.h";
+               source "core/except.cpp";
+               source "core/except.h";
+               source "core/filters/biquad.h";
+               source "core/filters/biquad.cpp";
+               source "core/filters/nfc.cpp";
+               source "core/filters/nfc.h";
+               source "core/filters/splitter.cpp";
+               source "core/filters/splitter.h";
+               source "core/fmt_traits.cpp";
+               source "core/fmt_traits.h";
+               source "core/fpu_ctrl.cpp";
+               source "core/fpu_ctrl.h";
+               source "core/front_stablizer.h";
+               source "core/helpers.cpp";
+               source "core/helpers.h";
+               source "core/hrtf.cpp";
+               source "core/hrtf.h";
+               source "core/logging.cpp";
+               source "core/logging.h";
+               source "core/mastering.cpp";
+               source "core/mastering.h";
+               source "core/mixer.cpp";
+               source "core/mixer.h";
+               source "core/resampler_limits.h";
+               source "core/uhjfilter.cpp";
+               source "core/uhjfilter.h";
+               source "core/uiddefs.cpp";
+               source "core/voice.cpp";
+               source "core/voice.h";
+               source "core/voice_change.h";
+
+               source "core/mixer/defs.h";
+               source "core/mixer/hrtfbase.h";
+               source "core/mixer/hrtfdefs.h";
+               source "core/mixer/mixer_c.cpp";
+
+               source "al/auxeffectslot.cpp";
+               source "al/auxeffectslot.h";
+               source "al/buffer.cpp";
+               source "al/buffer.h";
+               source "al/effect.cpp";
+               source "al/effect.h";
+               source "al/effects/autowah.cpp";
+               source "al/effects/chorus.cpp";
+               source "al/effects/compressor.cpp";
+               source "al/effects/convolution.cpp";
+               source "al/effects/dedicated.cpp";
+               source "al/effects/distortion.cpp";
+               source "al/effects/echo.cpp";
+               source "al/effects/effects.cpp";
+               source "al/effects/effects.h";
+               source "al/effects/equalizer.cpp";
+               source "al/effects/fshifter.cpp";
+               source "al/effects/modulator.cpp";
+               source "al/effects/null.cpp";
+               source "al/effects/pshifter.cpp";
+               source "al/effects/reverb.cpp";
+               source "al/effects/vmorpher.cpp";
+               source "al/error.cpp";
+               source "al/event.cpp";
+               source "al/event.h";
+               source "al/extension.cpp";
+               source "al/filter.cpp";
+               source "al/filter.h";
+               source "al/listener.cpp";
+               source "al/listener.h";
+               source "al/source.cpp";
+               source "al/source.h";
+               source "al/state.cpp";
+
+               source "alc/alc.cpp";
+               source "alc/alu.cpp";
+               source "alc/alu.h";
+               source "alc/alconfig.cpp";
+               source "alc/alconfig.h";
+               source "alc/context.cpp";
+               source "alc/context.h";
+               source "alc/device.cpp";
+               source "alc/device.h";
+               source "alc/effects/base.h";
+               source "alc/effects/autowah.cpp";
+               source "alc/effects/chorus.cpp";
+               source "alc/effects/compressor.cpp";
+               source "alc/effects/convolution.cpp";
+               source "alc/effects/dedicated.cpp";
+               source "alc/effects/distortion.cpp";
+               source "alc/effects/echo.cpp";
+               source "alc/effects/equalizer.cpp";
+               source "alc/effects/fshifter.cpp";
+               source "alc/effects/modulator.cpp";
+               source "alc/effects/null.cpp";
+               source "alc/effects/pshifter.cpp";
+               source "alc/effects/reverb.cpp";
+               source "alc/effects/vmorpher.cpp";
+               source "alc/inprogext.h";
+               source "alc/panning.cpp";
+
+               if_arch "x86-64"
+               {
+                       source "core/mixer/mixer_sse2.cpp";
+                       build_info
+                       {
+                               define "HAVE_SSE2" "1";
+                               define "HAVE_SSE_INTRINSICS" "1";
+                       };
+               };
+
+               source "alc/backends/base.cpp";
+               source "alc/backends/base.h";
+               source "alc/backends/loopback.cpp";
+               source "alc/backends/loopback.h";
+               source "alc/backends/null.cpp";
+               source "alc/backends/null.h";
+
+               if_feature "winmm"
+               {
+                       source "alc/backends/winmm.cpp";
+                       source "alc/backends/winmm.h";
+               };
+
+               if_feature "dsound"
+               {
+                       source "alc/backends/dsound.cpp";
+                       source "alc/backends/dsound.h";
+               };
+
+               if_feature "wasapi"
+               {
+                       source "alc/backends/wasapi.cpp";
+                       source "alc/backends/wasapi.h";
+               };
+
+               if_feature "wave"
+               {
+                       source "alc/backends/wave.cpp";
+                       source "alc/backends/wave.h";
+               };
+
+               build_info
+               {
+                       define "AL_BUILD_LIBRARY" "1";
+                       define "AL_ALEXT_PROTOTYPES" "1";
+               };
+
+               install true;
+               install_headers false;
+       };
+
+       install "include/AL"
+       {
+               source "include/AL";
+       };
+};
diff --git a/config.h b/config.h
new file mode 100644 (file)
index 0000000..0d553a9
--- /dev/null
+++ b/config.h
@@ -0,0 +1,11 @@
+#ifdef WITH_WASAPI
+#define HAVE_WASAPI
+#endif
+
+#ifdef WITH_DSOUND
+#define HAVE_DSOUND
+#endif
+
+#ifdef WITH_WINMM
+#define HAVE_WINMM
+#endif
diff --git a/version.h b/version.h
new file mode 100644 (file)
index 0000000..d1608d0
--- /dev/null
+++ b/version.h
@@ -0,0 +1,5 @@
+#define ALSOFT_VERSION "1.23.1"
+#define ALSOFT_VERSION_NUM 1,23,1,0
+
+#define ALSOFT_GIT_BRANCH ""
+#define ALSOFT_GIT_COMMIT_HASH ""