[GSOC] Add SDL2 library + additional SDL libraries #92
135
contrib/sdk/sources/SDL2-2.30.7/Makefile
Normal file
135
contrib/sdk/sources/SDL2-2.30.7/Makefile
Normal file
@ -0,0 +1,135 @@
|
||||
CC = kos32-gcc
|
||||
AR = kos32-ar
|
||||
LD = kos32-ld
|
||||
STRIP = kos32-strip
|
||||
|
||||
LIBNAME = libSDL2
|
||||
LIBNAMETEST = libSDL2test
|
||||
|
||||
LIBS:= -lgcc -lc.dll -ldll -lsound
|
||||
|
||||
LDFLAGS+= -shared -s -T dll.lds --entry _DllStartup --image-base=0 --out-implib $(LIBNAME).dll.a
|
||||
TLDFLAGS+= -shared -s -T dll.lds --entry _DllStartup --image-base=0 --out-implib $(LIBNAMETEST).dll.a
|
||||
LDFLAGS+= -L/home/autobuild/tools/win32/mingw32/lib
|
||||
TLDFLAGS+= -L/home/autobuild/tools/win32/mingw32/lib -L../../lib
|
||||
|
||||
atomic_OBJS = src/atomic/SDL_atomic.o src/atomic/SDL_spinlock.o
|
||||
|
||||
audio_OBJS = src/audio/SDL_audio.o src/audio/SDL_audiocvt.o \
|
||||
src/audio/SDL_audiodev.o src/audio/SDL_audiotypecvt.o \
|
||||
src/audio/SDL_mixer.o src/audio/SDL_wave.o \
|
||||
src/audio/dummy/SDL_dummyaudio.o
|
||||
|
||||
cpuinfo_OBJS = zsrc/cpuinfo/SDL_cpuinfo.o
|
||||
|
||||
events_OBJS = src/events/imKStoUCS.o src/events/SDL_clipboardevents.o \
|
||||
src/events/SDL_displayevents.o src/events/SDL_dropevents.o \
|
||||
src/events/SDL_events.o src/events/SDL_gesture.o \
|
||||
src/events/SDL_keyboard.o src/events/SDL_keysym_to_scancode.o \
|
||||
src/events/SDL_mouse.o src/events/SDL_quit.o \
|
||||
src/events/SDL_scancode_tables.o src/events/SDL_touch.o \
|
||||
src/events/SDL_windowevents.o
|
||||
|
||||
file_OBJS = src/file/SDL_rwops.o
|
||||
|
||||
haptic_OBJS = src/haptic/SDL_haptic.o src/haptic/dummy/SDL_syshaptic.o
|
||||
|
||||
hidapi_OBJS = src/hidapi/SDL_hidapi.o
|
||||
|
||||
joystick_OBJS = src/joystick/controller_type.o src/joystick/SDL_gamecontroller.o \
|
||||
src/joystick/SDL_joystick.o src/joystick/SDL_steam_virtual_gamepad.o \
|
||||
src/joystick/dummy/SDL_sysjoystick.o
|
||||
|
||||
loadso_OBJS = src/loadso/dummy/SDL_sysloadso.o
|
||||
|
||||
power_OBJS = src/power/SDL_power.o
|
||||
|
||||
filesystem_OBJS = src/filesystem/dummy/SDL_sysfilesystem.o
|
||||
|
||||
locale_OBJS = src/locale/SDL_locale.o src/locale/dummy/SDL_syslocale.o
|
||||
|
||||
misc_OBJS = src/misc/SDL_url.o src/misc/dummy/SDL_sysurl.o
|
||||
|
||||
render_OBJS = src/render/SDL_render.o src/render/SDL_yuv_sw.o \
|
||||
src/render/software/SDL_blendfillrect.o src/render/software/SDL_blendline.o \
|
||||
src/render/software/SDL_blendpoint.o src/render/software/SDL_drawline.o \
|
||||
src/render/software/SDL_drawpoint.o src/render/software/SDL_render_sw.o \
|
||||
src/render/software/SDL_rotate.o src/render/software/SDL_triangle.o
|
||||
|
||||
sensor_OBJS = src/sensor/SDL_sensor.o src/sensor/dummy/SDL_dummysensor.o
|
||||
|
||||
stdlib_OBJS = src/stdlib/SDL_crc16.o src/stdlib/SDL_crc32.o src/stdlib/SDL_getenv.o \
|
||||
src/stdlib/SDL_iconv.o src/stdlib/SDL_malloc.o src/stdlib/SDL_mslibc.o \
|
||||
src/stdlib/SDL_qsort.o src/stdlib/SDL_stdlib.o src/stdlib/SDL_string.o \
|
||||
src/stdlib/SDL_strtokr.o
|
||||
|
||||
libm_OBJS = src/libm/e_atan2.o src/libm/e_exp.o src/libm/e_fmod.o src/libm/e_log.o \
|
||||
src/libm/e_log10.o src/libm/e_pow.o src/libm/e_rem_pio2.o src/libm/e_sqrt.o \
|
||||
src/libm/k_cos.o src/libm/k_rem_pio2.o src/libm/k_sin.o src/libm/k_tan.o \
|
||||
src/libm/s_atan.o src/libm/s_copysign.o src/libm/s_cos.o src/libm/s_fabs.o \
|
||||
src/libm/s_floor.o src/libm/s_scalbn.o src/libm/s_sin.o src/libm/s_tan.o
|
||||
|
||||
thread_OBJS = src/thread/SDL_thread.o src/thread/generic/SDL_syscond.o \
|
||||
src/thread/generic/SDL_sysmutex.o src/thread/generic/SDL_syssem.o \
|
||||
src/thread/generic/SDL_systhread.o src/thread/generic/SDL_systls.o
|
||||
|
||||
timer_OBJS = src/timer/SDL_timer.o src/timer/dummy/SDL_systimer.o
|
||||
|
||||
video_OBJS = src/video/SDL_blit_0.o src/video/SDL_blit_1.o src/video/SDL_blit_A.o \
|
||||
src/video/SDL_blit_auto.o src/video/SDL_blit_copy.o src/video/SDL_blit_N.o \
|
||||
src/video/SDL_blit_slow.o src/video/SDL_blit.o src/video/SDL_bmp.o \
|
||||
src/video/SDL_clipboard.o src/video/SDL_egl.o src/video/SDL_fillrect.o \
|
||||
src/video/SDL_pixels.o src/video/SDL_rect.o src/video/SDL_RLEaccel.o \
|
||||
src/video/SDL_shape.o src/video/SDL_stretch.o src/video/SDL_surface.o \
|
||||
src/video/SDL_video.o src/video/SDL_yuv.o src/video/yuv2rgb/yuv_rgb_lsx.o \
|
||||
src/video/yuv2rgb/yuv_rgb_sse.o src/video/yuv2rgb/yuv_rgb_std.o \
|
||||
src/video/dummy/SDL_nullevents.o src/video/dummy/SDL_nullframebuffer.o \
|
||||
src/video/dummy/SDL_nullvideo.o
|
||||
|
||||
curr_OBJS = src/SDL_assert.o src/SDL_dataqueue.o src/SDL_error.o src/SDL_guid.o \
|
||||
src/SDL_hints.o src/SDL_list.o src/SDL_log.o src/SDL_utils.o src/SDL.o
|
||||
|
||||
OBJS = $(atomic_OBJS) $(audio_OBJS) $(cpuinfo_OBJS) $(events_OBJS) $(file_OBJS) $(haptic_OBJS) \
|
||||
$(hidapi_OBJS) $(joystick_OBJS) $(loadso_OBJS) $(power_OBJS) $(filesystem_OBJS) \
|
||||
$(locale_OBJS) $(misc_OBJS) $(render_OBJS) $(sensor_OBJS) $(stdlib_OBJS) $(libm_OBJS) \
|
||||
$(thread_OBJS) $(timer_OBJS) $(video_OBJS) $(curr_OBJS)
|
||||
|
||||
TOBJS = src/test/SDL_test_assert.o src/test/SDL_test_common.o src/test/SDL_test_compare.o \
|
||||
src/test/SDL_test_crc32.o src/test/SDL_test_font.o src/test/SDL_test_fuzzer.o \
|
||||
src/test/SDL_test_harness.o src/test/SDL_test_imageBlit.o \
|
||||
src/test/SDL_test_imageBlitBlend.o src/test/SDL_test_imageFace.o \
|
||||
src/test/SDL_test_imagePrimitives.o src/test/SDL_test_imagePrimitivesBlend.o \
|
||||
src/test/SDL_test_log.o src/test/SDL_test_md5.o src/test/SDL_test_memory.o \
|
||||
src/test/SDL_test_random.o
|
||||
|
||||
CFLAGS = -c -O2 -mpreferred-stack-boundary=2 -fno-ident -fomit-frame-pointer -fno-stack-check \
|
||||
-fno-stack-protector -mno-stack-arg-probe -fno-exceptions -fno-asynchronous-unwind-tables \
|
||||
-ffast-math -mno-ms-bitfields -fexpensive-optimizations -march=pentium-mmx \
|
||||
-D__KOLIBRI__ -D_KOLIBRI -DKOLIBRI -D_KOS_ -D_KOS -DKOS \
|
||||
-DPACKAGE=\"SDL\" -DVERSION=\"2.30.7\" -U_Win32 -UWIN32 -U_WIN32 -U__MINGW32__ -U__WIN32__ \
|
||||
-I../newlib/libc/include/ -Iinclude/ -Iatomic/ -Iaudio/ -Icpuinfo/ -Ievents/ -Ifile/ -Ihaptic/ \
|
||||
-Ihidapi/ -Ijoystick/ -Iloadso/ -Ipower/ -Ifilesystem/ -Ilocale/ -Imisc/ -Irender/ -Isensor/ \
|
||||
-Istdlib/ -Ilibm/ -Ithread/ -Itimer/ -Ivideo/ -I.
|
||||
|
||||
all: $(LIBNAME).a $(LIBNAME).dll $(LIBNAMETEST).a $(LIBNAMETEST).dll
|
||||
|
||||
$(LIBNAME).a: $(OBJS)
|
||||
$(AR) -crs ../../lib/$@ $^
|
||||
|
||||
$(LIBNAME).dll: $(OBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
$(STRIP) -S $@
|
||||
|
||||
$(LIBNAMETEST).a: $(TOBJS)
|
||||
$(AR) -crs ../../lib/$@ $^
|
||||
|
||||
$(LIBNAMETEST).dll: $(TOBJS)
|
||||
$(LD) $(TLDFLAGS) -o $@ $^ -lSDL2 $(LIBS)
|
||||
$(STRIP) -S $@
|
||||
|
||||
%.o : %.c Makefile
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) $(TOBJS) ../../lib/$(LIBNAME).a ../../lib/$(LIBNAMETEST).a $(LIBNAME).dll $(LIBNAME).dll.a \
|
||||
$(LIBNAMETEST).dll $(LIBNAMETEST).dll.a
|
166
contrib/sdk/sources/SDL2-2.30.7/test/Makefile
Normal file
166
contrib/sdk/sources/SDL2-2.30.7/test/Makefile
Normal file
@ -0,0 +1,166 @@
|
||||
CC = kos32-gcc
|
||||
LD = kos32-ld
|
||||
OBJCOPY = kos32-objcopy
|
||||
|
||||
SDK_DIR = ../../..
|
||||
LDFLAGS = -nostdlib -static --image-base 0 -T $(SDK_DIR)/sources/newlib/app.lds --subsystem native
|
||||
CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32
|
||||
LIBS = -lSDL2test -lSDL2 -lgcc -lc.dll -lc -lsound
|
||||
|
||||
INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include -I ../include/
|
||||
LIBPATH = -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib
|
||||
|
||||
all: checkkeys loopwave loopwavequeue testatomic testaudioinfo testbounds testcustomcursor testdisplayinfo testdraw2 testdrawchessboard testfile \
|
||||
testfilesystem testgeometry testiconv testime testintersections testkeys testmouse testmultiaudio testoverlay2 \
|
||||
testplatform testqsort testrelative testrendercopyex testrendertarget testresample testscale testshape testsprite2 \
|
||||
testspriteminimal teststreaming testver testviewport testwm2 testyuv
|
||||
|
||||
checkkeys: checkkeys.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
loopwave: loopwave.o testutils.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
loopwavequeue: loopwavequeue.o testutils.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testatomic: testatomic.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testaudioinfo: testaudioinfo.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testbounds: testbounds.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testcustomcursor: testcustomcursor.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testdisplayinfo: testdisplayinfo.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testdraw2: testdraw2.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testdrawchessboard: testdrawchessboard.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testfile: testfile.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testfilesystem: testfilesystem.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testgeometry: testgeometry.o testutils.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testiconv: testiconv.o testutils.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testime: testime.o testutils.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testintersections: testintersections.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testkeys: testkeys.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testmouse: testmouse.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testmultiaudio: testmultiaudio.o testutils.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testoverlay2: testoverlay2.o testyuv_cvt.o testutils.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testplatform: testplatform.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testqsort: testqsort.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testrelative: testrelative.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testrendercopyex: testrendercopyex.o testutils.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testrendertarget: testrendertarget.o testutils.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testresample: testresample.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testscale: testscale.o testutils.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testshape: testshape.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testsprite2: testsprite2.o testutils.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testspriteminimal: testspriteminimal.o testutils.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
teststreaming: teststreaming.o testutils.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testver: testver.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testviewport: testviewport.o testutils.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testwm2: testwm2.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
testyuv: testyuv.o testyuv_cvt.o
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
|
||||
$(OBJCOPY) $@ -O binary
|
||||
|
||||
%.o : %.c Makefile
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f checkkeys loopwave loopwavequeue testatomic testaudioinfo testbounds testcustomcursor testdisplayinfo testdraw2 testdrawchessboard testfile \
|
||||
testfilesystem testgeometry testiconv testime testintersections testkeys testmouse testmultiaudio testoverlay2 \
|
||||
testplatform testqsort testrelative testrendercopyex testrendertarget testresample testscale testshape testsprite2 \
|
||||
testspriteminimal teststreaming testver testviewport testwm2 testyuv
|
57
contrib/sdk/sources/SDL2_image-2.8.2/Makefile
Normal file
57
contrib/sdk/sources/SDL2_image-2.8.2/Makefile
Normal file
@ -0,0 +1,57 @@
|
||||
CC = kos32-gcc
|
||||
AR = kos32-ar
|
||||
LD = kos32-ld
|
||||
STRIP = kos32-strip
|
||||
|
||||
LIBNAME=libSDL2_image
|
||||
|
||||
LIBS:= -lSDL2 -ljpeg -lpng16 -lz.dll -lgcc -lc.dll -ldll -lsound
|
||||
|
||||
LDFLAGS+= -shared -s -T dll.lds --entry _DllStartup --image-base=0 --out-implib $(LIBNAME).dll.a
|
||||
LDFLAGS+= -L/home/autobuild/tools/win32/mingw32/lib -L../../lib
|
||||
|
||||
OBJS = src/IMG.o \
|
||||
src/IMG_bmp.o \
|
||||
src/IMG_gif.o \
|
||||
src/IMG_jpg.o \
|
||||
src/IMG_lbm.o \
|
||||
src/IMG_pcx.o \
|
||||
src/IMG_png.o \
|
||||
src/IMG_pnm.o \
|
||||
src/IMG_svg.o \
|
||||
src/IMG_tga.o \
|
||||
src/IMG_tif.o \
|
||||
src/IMG_xcf.o \
|
||||
src/IMG_xpm.o \
|
||||
src/IMG_xv.o \
|
||||
src/IMG_webp.o \
|
||||
src/IMG_qoi.o \
|
||||
src/IMG_avif.o \
|
||||
src/IMG_jxl.o \
|
||||
src/IMG_stb.o
|
||||
|
||||
|
||||
CFLAGS = -c -O2 -mpreferred-stack-boundary=2 -fno-ident -fomit-frame-pointer -fno-stack-check \
|
||||
-fno-stack-protector -mno-stack-arg-probe -fno-exceptions -fno-asynchronous-unwind-tables \
|
||||
-ffast-math -mno-ms-bitfields -march=pentium-mmx \
|
||||
-U_Win32 -UWIN32 -U_WIN32 -U__MINGW32__ -U__WIN32__ \
|
||||
-I../newlib/libc/include/ -I../SDL2-2.30.7/include/ -I../libjpeg/ -I.. -I../libpng/ -Iinclude/ -Isrc/ \
|
||||
-DLOAD_JPG -DLOAD_PNG -DLOAD_BMP -DLOAD_GIF -DLOAD_LBM -DLOAD_PCX -DLOAD_PNM \
|
||||
-DLOAD_TGA -DLOAD_XCF -DLOAD_XPM -DLOAD_XV -DLOAD_SVG -DLOAD_QOI \
|
||||
-DSDL_IMAGE_SAVE_JPG=1 -DSDL_IMAGE_SAVE_PNG=1 \
|
||||
-DSDL_BUILD_MAJOR_VERSION=2 -DSDL_BUILD_MINOR_VERSION=8 -DSDL_BUILD_MICRO_VERSION=2
|
||||
|
||||
all: $(LIBNAME).a $(LIBNAME).dll
|
||||
|
||||
$(LIBNAME).a: $(OBJS)
|
||||
$(AR) -crs ../../lib/$@ $^
|
||||
|
||||
$(LIBNAME).dll: $(OBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
$(STRIP) -S $@
|
||||
|
||||
%.o : %.c Makefile
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) ../../lib/$(LIBNAME).a $(LIBNAME).dll $(LIBNAME).dll.a
|
32
contrib/sdk/sources/SDL2_image-2.8.2/examples/Makefile
Normal file
32
contrib/sdk/sources/SDL2_image-2.8.2/examples/Makefile
Normal file
@ -0,0 +1,32 @@
|
||||
CC = kos32-gcc
|
||||
LD = kos32-ld
|
||||
OBJCOPY = kos32-objcopy
|
||||
|
||||
SDK_DIR = ../../..
|
||||
LDFLAGS = -nostdlib -static --image-base 0 -T $(SDK_DIR)/sources/newlib/app.lds --subsystem native
|
||||
CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -D_KOLIBRI
|
||||
CFLAGS += -DLOAD_JPG -DLOAD_PNG -DLOAD_BMP -DLOAD_GIF -DLOAD_LBM -DLOAD_PCX -DLOAD_PNM \
|
||||
-DLOAD_TGA -DLOAD_XCF -DLOAD_XPM -DLOAD_XV -DLOAD_SVG -DLOAD_QOI
|
||||
CFLAGS += -DSDL_IMAGE_SAVE_JPG=1 -DSDL_IMAGE_SAVE_PNG=1
|
||||
LIBS = -lSDL2_image -lSDL2 -ljpeg -lpng16 -lz.dll -lgcc -lc.dll -lc -lsound
|
||||
|
||||
INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include -I../include/ -I../../SDL2-2.30.7/include/
|
||||
LIBPATH = -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib
|
||||
|
||||
default: examples
|
||||
|
||||
examples: $(OBJECTS) Makefile
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o showanim.o showanim.c
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o showimage.o showimage.c
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) --subsystem native -o showanim showanim.o $(LIBS)
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) --subsystem native -o showimage showimage.o $(LIBS)
|
||||
kos32-strip -s showanim -o showanim
|
||||
kos32-strip -s showimage -o showimage
|
||||
kos32-objcopy showanim -O binary
|
||||
kos32-objcopy showimage -O binary
|
||||
rm showanim.o
|
||||
rm showimage.o
|
||||
|
||||
clean:
|
||||
rm showanim
|
||||
rm showimage
|
79
contrib/sdk/sources/SDL2_mixer-2.8.0/Makefile
Normal file
79
contrib/sdk/sources/SDL2_mixer-2.8.0/Makefile
Normal file
@ -0,0 +1,79 @@
|
||||
CC = kos32-gcc
|
||||
AR = kos32-ar
|
||||
LD = kos32-ld
|
||||
STRIP = kos32-strip
|
||||
|
||||
LIBNAME=libSDL2_mixer
|
||||
TIMIDITY=libtimidity
|
||||
|
||||
LIBS:= -lSDL2 -ltimidity -lvorbis -logg -lgcc -lc.dll -ldll -lsound
|
||||
TLIBS:= -lSDL2 -lgcc -lc.dll -ldll -lsound
|
||||
|
||||
LDFLAGS+= -shared -s -T dll.lds --entry _DllStartup --image-base=0 --out-implib $(LIBNAME).dll.a
|
||||
TLDFLAGS+= -shared -s -T dll.lds --entry _DllStartup --image-base=0 --out-implib $(TIMIDITY).dll.a
|
||||
LDFLAGS+= -L/home/autobuild/tools/win32/mingw32/lib -L../../lib
|
||||
|
||||
OBJS = src/utils.o \
|
||||
src/effect_position.o \
|
||||
src/effects_internal.o \
|
||||
src/effect_stereoreverse.o \
|
||||
src/mixer.o \
|
||||
src/music.o \
|
||||
src/codecs/load_aiff.o \
|
||||
src/codecs/load_voc.o \
|
||||
src/codecs/music_wav.o \
|
||||
src/codecs/music_ogg.o \
|
||||
src/codecs/music_ogg_stb.o \
|
||||
src/codecs/music_flac.o \
|
||||
src/codecs/music_drflac.o \
|
||||
src/codecs/music_wavpack.o \
|
||||
src/codecs/mp3utils.o \
|
||||
src/codecs/music_mpg123.o \
|
||||
src/codecs/music_minimp3.o \
|
||||
src/codecs/music_xmp.o \
|
||||
src/codecs/music_modplug.o \
|
||||
src/codecs/music_gme.o \
|
||||
src/codecs/music_fluidsynth.o \
|
||||
src/codecs/music_timidity.o
|
||||
|
||||
TOBJS = src/codecs/timidity/common.o \
|
||||
src/codecs/timidity/instrum.o \
|
||||
src/codecs/timidity/mix.o \
|
||||
src/codecs/timidity/output.o \
|
||||
src/codecs/timidity/playmidi.o \
|
||||
src/codecs/timidity/readmidi.o \
|
||||
src/codecs/timidity/resample.o \
|
||||
src/codecs/timidity/tables.o \
|
||||
src/codecs/timidity/timidity.o
|
||||
|
||||
CFLAGS = -c -O2 -mpreferred-stack-boundary=2 -fno-ident -fomit-frame-pointer -fno-stack-check \
|
||||
-fno-stack-protector -mno-stack-arg-probe -fno-exceptions -fno-asynchronous-unwind-tables \
|
||||
-ffast-math -mno-ms-bitfields -march=pentium-mmx \
|
||||
-U_Win32 -UWIN32 -U_WIN32 -U__MINGW32__ -U__WIN32__ \
|
||||
-I../newlib/libc/include/ -I../SDL2-2.30.7/include/ -Iinclude/ -Isrc/ -Isrc/codecs \
|
||||
-I -Isrc/codecs/dr_libs -Isrc/codecs/minimp3 -Isrc/codecs/timidity \
|
||||
-I../libogg-1.3.5/include -I.. -I../libvorbis-1.3.7/include \
|
||||
-DMUSIC_WAV -DMUSIC_OGG -DMUSIC_MP3_MINIMP3 -DMUSIC_FLAC_DRFLAC -DMUSIC_MID_TIMIDITY \
|
||||
-DSDL_BUILD_MAJOR_VERSION=2 -DSDL_BUILD_MINOR_VERSION=8 -DSDL_BUILD_MICRO_VERSION=0
|
||||
|
||||
all: $(TIMIDITY).a $(TIMIDITY).dll $(LIBNAME).a $(LIBNAME).dll
|
||||
|
||||
$(TIMIDITY).a: $(TOBJS)
|
||||
$(AR) -crs ../../lib/$@ $^
|
||||
|
||||
$(TIMIDITY).dll: $(TOBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $^ $(TLIBS)
|
||||
$(STRIP) -S $@
|
||||
|
||||
$(LIBNAME).a: $(OBJS)
|
||||
$(AR) -crs ../../lib/$@ $^
|
||||
|
||||
$(LIBNAME).dll: $(OBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
$(STRIP) -S $@
|
||||
|
||||
%.o : %.c Makefile
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) ../../lib/$(LIBNAME).a ../../lib/$(TIMIDITY).a $(LIBNAME).dll $(LIBNAME).dll.a $(TIMIDITY).dll $(TIMIDITY).dll.a
|
30
contrib/sdk/sources/SDL2_mixer-2.8.0/examples/Makefile
Normal file
30
contrib/sdk/sources/SDL2_mixer-2.8.0/examples/Makefile
Normal file
@ -0,0 +1,30 @@
|
||||
CC = kos32-gcc
|
||||
LD = kos32-ld
|
||||
OBJCOPY = kos32-objcopy
|
||||
|
||||
SDK_DIR = ../../..
|
||||
LDFLAGS = -nostdlib -static --image-base 0 -T $(SDK_DIR)/sources/newlib/app.lds --subsystem native
|
||||
CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -D_KOLIBRI
|
||||
CFLAGS += -DMUSIC_WAV -DMUSIC_OGG -DMUSIC_MP3_MINIMP3 -DMUSIC_FLAC_DRFLAC -DMUSIC_MID_TIMIDITY
|
||||
LIBS = -lSDL2_mixer -lSDL2 -ltimidity -lvorbis -logg -lgcc -lc.dll -lc -lsound
|
||||
|
||||
INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include -I../include/ -I../../SDL2-2.30.7/include/
|
||||
LIBPATH = -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib
|
||||
|
||||
default: examples
|
||||
|
||||
examples: $(OBJECTS) Makefile
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o playmus.o playmus.c
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o playwave.o playwave.c
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) --subsystem native -o playmus playmus.o $(LIBS)
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) --subsystem native -o playwave playwave.o $(LIBS)
|
||||
kos32-strip -s playmus -o playmus
|
||||
kos32-strip -s playwave -o playwave
|
||||
kos32-objcopy playmus -O binary
|
||||
kos32-objcopy playwave -O binary
|
||||
rm playmus.o
|
||||
rm playwave.o
|
||||
|
||||
clean:
|
||||
rm playmus
|
||||
rm playwave
|
35
contrib/sdk/sources/SDL2_ttf-2.22.0/Makefile
Normal file
35
contrib/sdk/sources/SDL2_ttf-2.22.0/Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
CC = kos32-gcc
|
||||
AR = kos32-ar
|
||||
LD = kos32-ld
|
||||
STRIP = kos32-strip
|
||||
|
||||
LIBNAME=libSDL2_ttf
|
||||
|
||||
LIBS:= -lSDL2 -lfreetype -lgcc -lc.dll -ldll -lsound
|
||||
|
||||
LDFLAGS+= -shared -s -T dll.lds --entry _DllStartup --image-base=0 --out-implib $(LIBNAME).dll.a
|
||||
LDFLAGS+= -L/home/autobuild/tools/win32/mingw32/lib -L../../lib
|
||||
|
||||
OBJS = SDL_ttf.o
|
||||
|
||||
CFLAGS = -c -O2 -mpreferred-stack-boundary=2 -fno-ident -fomit-frame-pointer -fno-stack-check \
|
||||
-fno-stack-protector -mno-stack-arg-probe -fno-exceptions -fno-asynchronous-unwind-tables \
|
||||
-ffast-math -mno-ms-bitfields -march=pentium-mmx \
|
||||
-U_Win32 -UWIN32 -U_WIN32 -U__MINGW32__ -U__WIN32__ \
|
||||
-I../newlib/libc/include/ -I../SDL2-2.30.7/include/ -I../freetype/include/ -I.. \
|
||||
-DSDL_BUILD_MAJOR_VERSION=2 -DSDL_BUILD_MINOR_VERSION=22 -DSDL_BUILD_MICRO_VERSION=0
|
||||
|
||||
all: $(LIBNAME).a $(LIBNAME).dll
|
||||
|
||||
$(LIBNAME).a: $(OBJS)
|
||||
$(AR) -crs ../../lib/$@ $^
|
||||
|
||||
$(LIBNAME).dll: $(OBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
$(STRIP) -S $@
|
||||
|
||||
%.o : %.c Makefile
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) ../../lib/$(LIBNAME).a $(LIBNAME).dll $(LIBNAME).dll.a
|
23
contrib/sdk/sources/SDL2_ttf-2.22.0/example/Makefile
Normal file
23
contrib/sdk/sources/SDL2_ttf-2.22.0/example/Makefile
Normal file
@ -0,0 +1,23 @@
|
||||
CC = kos32-gcc
|
||||
LD = kos32-ld
|
||||
OBJCOPY = kos32-objcopy
|
||||
|
||||
SDK_DIR = ../../..
|
||||
LDFLAGS = -nostdlib -static --image-base 0 -T $(SDK_DIR)/sources/newlib/app.lds --subsystem native
|
||||
CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -D_KOLIBRI
|
||||
LIBS = -lSDL2_ttf -lSDL2 -lfreetype -lgcc -lc.dll -lc -lsound
|
||||
|
||||
INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include -I../ -I../../SDL-2.30.7/include/
|
||||
LIBPATH = -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib
|
||||
|
||||
default: examples
|
||||
|
||||
examples: $(OBJECTS) Makefile
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o showfont.o showfont.c
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) --subsystem native -o showfont showfont.o $(LIBS)
|
||||
kos32-strip -s showfont -o showfont
|
||||
kos32-objcopy showfont -O binary
|
||||
rm showfont.o
|
||||
|
||||
clean:
|
||||
rm showfont
|
Loading…
Reference in New Issue
Block a user