🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
4.8 KiB

  1. # Open Watcom makefile to build SDL2.dll for OS/2
  2. # wmake -f Makefile.os2
  3. LIBNAME = SDL2
  4. VERSION = 2.0.13
  5. DESCRIPTION = Simple DirectMedia Layer 2
  6. LIBHOME = .
  7. LIBPATH = $(LIBHOME)/lib
  8. DLLFILE = $(LIBHOME)/$(LIBNAME).dll
  9. LIBFILE = $(LIBHOME)/$(LIBNAME).lib
  10. LNKFILE = $(LIBNAME).lnk
  11. INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
  12. INCPATH+= -I"$(LIBHOME)/h"
  13. INCPATH+= -Iinclude
  14. LIBM = libm.lib
  15. LIBS = mmpm2.lib libuls.lib libconv.lib $(LIBM)
  16. CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
  17. # max warnings:
  18. CFLAGS+= -wx
  19. # building dll:
  20. CFLAGS+= -bd
  21. # the include paths :
  22. CFLAGS+= $(INCPATH)
  23. # building SDL itself (for DECLSPEC):
  24. CFLAGS+= -DBUILD_SDL
  25. MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.c &
  26. k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
  27. s_atan.c s_copysign.c s_cos.c s_fabs.c s_floor.c s_scalbn.c s_sin.c s_tan.c
  28. SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c
  29. SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c
  30. SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
  31. SRCS+= SDL_rwops.c SDL_power.c
  32. SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
  33. SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
  34. SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
  35. SDL_sensor.c SDL_touch.c
  36. SRCS+= SDL_haptic.c SDL_gamecontroller.c SDL_joystick.c
  37. SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
  38. SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
  39. SDL_render_sw.c SDL_rotate.c
  40. SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
  41. SDL_blit_copy.c SDL_blit_N.c SDL_blit_slow.c SDL_fillrect.c SDL_bmp.c &
  42. SDL_pixels.c SDL_rect.c SDL_RLEaccel.c SDL_shape.c SDL_stretch.c &
  43. SDL_surface.c SDL_video.c SDL_clipboard.c SDL_vulkan_utils.c SDL_egl.c
  44. SRCS+= SDL_syscond.c SDL_sysmutex.c SDL_syssem.c SDL_systhread.c SDL_systls.c
  45. SRCS+= SDL_systimer.c
  46. SRCS+= SDL_sysloadso.c
  47. SRCS+= SDL_sysfilesystem.c
  48. SRCS+= SDL_syshaptic.c SDL_sysjoystick.c
  49. SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
  50. SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
  51. SRCS+= SDL_dummysensor.c
  52. SRCS+= SDL_dynapi.c
  53. SRCS+= SDL_locale.c SDL_syslocale.c
  54. OBJS = $(SRCS:.c=.obj)
  55. MOBJS= $(MSRCS:.c=.obj)
  56. .extensions:
  57. .extensions: .lib .dll .obj .c .asm
  58. .c: ./src;./src/dynapi;./src/audio;./src/cpuinfo;./src/events;./src/file;./src/haptic;./src/joystick;./src/power;./src/render;./src/render/software;./src/sensor;./src/stdlib;./src/thread;./src/timer;./src/video;./src/video/yuv2rgb;./src/atomic;./src/audio/disk;
  59. .c: ./src/haptic/dummy;./src/joystick/dummy;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
  60. .c: ./src/loadso/dummy;./src/filesystem/dummy;./src/timer/dummy;./src/thread/generic;./src/locale/;./src/locale/unix
  61. all: $(DLLFILE) $(LIBFILE) .symbolic
  62. $(DLLFILE): $(OBJS) $(LIBM) $(LNKFILE)
  63. @echo * Linking: $@
  64. wlink @$(LNKFILE)
  65. $(LIBFILE): $(DLLFILE)
  66. @echo * Creating LIB file: $@
  67. wlib -q -b -n -c -pa -s -t -zld -ii -io $* $(DLLFILE)
  68. .c.obj:
  69. wcc386 $(CFLAGS) -fo=$^@ $<
  70. SDL_cpuinfo.obj: SDL_cpuinfo.c
  71. wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
  72. SDL_rwops.obj: SDL_rwops.c
  73. wcc386 $(CFLAGS) -wcd=136 -fo=$^@ $<
  74. SDL_wave.obj: SDL_wave.c
  75. wcc386 $(CFLAGS) -wcd=124 -fo=$^@ $<
  76. SDL_blendfillrect.obj: SDL_blendfillrect.c
  77. wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
  78. SDL_blendline.obj: SDL_blendline.c
  79. wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
  80. SDL_blendpoint.obj: SDL_blendpoint.c
  81. wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
  82. SDL_RLEaccel.obj: SDL_RLEaccel.c
  83. wcc386 $(CFLAGS) -wcd=201 -fo=$^@ $<
  84. .c: ./src/libm;
  85. $(LIBM): $(MOBJS)
  86. wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
  87. $(LNKFILE):
  88. @echo * Creating linker file: $@
  89. @%create $@
  90. @%append $@ SYSTEM os2v2_dll INITINSTANCE TERMINSTANCE
  91. @%append $@ NAME $(DLLFILE)
  92. @for %i in ($(OBJS)) do @%append $@ FILE %i
  93. @%append $@ LIBPATH $(%LIB);$(LIBPATH)
  94. @for %i in ($(LIBS)) do @%append $@ LIB %i
  95. @%append $@ OPTION QUIET
  96. @%append $@ OPTION IMPF=$(LIBHOME)/$^&.exp
  97. @%append $@ OPTION MAP=$(LIBHOME)/$^&.map
  98. @%append $@ OPTION DESCRIPTION '@$#libsdl org:$(VERSION)$#@$(DESCRIPTION)'
  99. @%append $@ OPTION QUIET
  100. @%append $@ OPTION ELIMINATE
  101. @%append $@ OPTION MANYAUTODATA
  102. @%append $@ OPTION OSNAME='OS/2 and eComStation'
  103. @%append $@ OPTION SHOWDEAD
  104. clean: .SYMBOLIC
  105. @ echo * Clean: $(LIBNAME)
  106. @if exist *.obj rm *.obj
  107. @if exist *.err rm *.err
  108. @if exist $(LNKFILE) rm $(LNKFILE)
  109. @if exist $(LIBM) rm $(LIBM)
  110. distclean: .SYMBOLIC clean
  111. @if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
  112. @if exist $(LIBHOME)/*.map rm $(LIBHOME)/*.map
  113. @if exist $(LIBFILE) rm $(LIBFILE)
  114. @if exist $(DLLFILE) rm $(DLLFILE)