diff --git a/contrib/sdk/sources/sound/Makefile.tcc b/contrib/sdk/sources/sound/Makefile.tcc new file mode 100644 index 0000000000..316f815618 --- /dev/null +++ b/contrib/sdk/sources/sound/Makefile.tcc @@ -0,0 +1,26 @@ +AR = ar +FASM = fasm +OBJCOPY = objcopy + +TARGET:= libsound + +dirs := ./src + +target_srcs:= $(foreach dir,$(dirs),$(wildcard $(dir)/*.asm)) + +target_objs:= $(subst .asm,.o,$(target_srcs)) + + +all: $(TARGET).a + +%.o: %.asm + $(FASM) $< $@ + + +$(TARGET).a: $(target_objs) Makefile + + $(AR) cvrs $@ $(target_objs) + objcopy -O elf32-i386 --redefine-syms=symbols $@ + +clean: + rm -f $(target_objs) $(TARGET).a diff --git a/contrib/sdk/sources/sound/include/sound.h b/contrib/sdk/sources/sound/include/sound.h index 866c4a2879..6018f981cd 100644 --- a/contrib/sdk/sources/sound/include/sound.h +++ b/contrib/sdk/sources/sound/include/sound.h @@ -2,6 +2,8 @@ #ifndef _SOUND_H_ #define _SOUND_H_ +#define _stdcall __attribute__((stdcall)) + #ifdef __cplusplus extern "C" { diff --git a/contrib/sdk/sources/sound/symbols b/contrib/sdk/sources/sound/symbols new file mode 100644 index 0000000000..cead6717cc --- /dev/null +++ b/contrib/sdk/sources/sound/symbols @@ -0,0 +1,24 @@ +_CreateBuffer@12 CreateBuffer +_DestroyBuffer@4 DestroyBuffer +_InitSound@4 InitSound +_PlayBuffer@8 PlayBuffer +_SetBuffer@16 SetBuffer +_GetFormat@8 GetFormat +_GetMasterVol@4 GetMasterVol +_GetPan@8 GetPan +_GetBufferPos@8 GetBufferPos +_GetBufferFree@8 GetBufferFree +_GetBufferSize@8 GetBufferSize +_GetVolume@12 GetVolume +_WaveOut@12 WaveOut +_ResetBuffer@8 ResetBuffer +_SetFormat@8 SetFormat +_SetMasterVol@4 SetMasterVol +_SetPan@8 SetPan +_SetBufferPos@8 SetBufferPos +_SetVolume@12 SetVolume +_GetDevTime@4 GetDevTime +_GetTimeStamp@8 GetTimeStamp +_SetTimeBase@12 SetTimeBase +_StopBuffer@4 StopBuffer +_test_wav@4 test_wav