🛠️🐜 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.

137 lines
4.6 KiB

  1. # Open Watcom makefile to build SDL2.dll for OS/2:
  2. # wmake -f Makefile.os2
  3. LIBNAME = SDL2
  4. VERSION = 2.0.10
  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
  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. OBJS = $(SRCS:.c=.obj)
  54. MOBJS= $(MSRCS:.c=.obj)
  55. .extensions:
  56. .extensions: .lib .dll .obj .c .asm
  57. .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;
  58. .c: ./src/haptic/dummy;./src/joystick/dummy;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
  59. .c: ./src/loadso/dummy;./src/filesystem/dummy;./src/timer/dummy;./src/thread/generic;
  60. all: $(DLLFILE) $(LIBFILE) .symbolic
  61. $(DLLFILE): $(OBJS) $(LIBM) $(LNKFILE)
  62. @echo * Linking: $@
  63. wlink @$(LNKFILE)
  64. $(LIBFILE): $(DLLFILE)
  65. @echo * Creating LIB file: $@
  66. wlib -q -b -n -c -pa -s -t -zld -ii -io $* $(DLLFILE)
  67. .c.obj:
  68. wcc386 $(CFLAGS) -fo=$^@ $<
  69. SDL_cpuinfo.obj: SDL_cpuinfo.c
  70. wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
  71. SDL_rwops.obj: SDL_rwops.c
  72. wcc386 $(CFLAGS) -wcd=136 -fo=$^@ $<
  73. SDL_blendfillrect.obj: SDL_blendfillrect.c
  74. wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
  75. SDL_blendline.obj: SDL_blendline.c
  76. wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
  77. SDL_blendpoint.obj: SDL_blendpoint.c
  78. wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
  79. SDL_RLEaccel.obj: SDL_RLEaccel.c
  80. wcc386 $(CFLAGS) -wcd=201 -fo=$^@ $<
  81. .c: ./src/libm;
  82. $(LIBM): $(MOBJS)
  83. wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
  84. $(LNKFILE):
  85. @echo * Creating linker file: $@
  86. @%create $@
  87. @%append $@ SYSTEM os2v2_dll INITINSTANCE TERMINSTANCE
  88. @%append $@ NAME $(DLLFILE)
  89. @for %i in ($(OBJS)) do @%append $@ FILE %i
  90. @%append $@ LIBPATH $(%LIB);$(LIBPATH)
  91. @for %i in ($(LIBS)) do @%append $@ LIB %i
  92. @%append $@ OPTION QUIET
  93. @%append $@ OPTION IMPF=$(LIBHOME)/$^&.exp
  94. @%append $@ OPTION MAP=$(LIBHOME)/$^&.map
  95. @%append $@ OPTION DESCRIPTION '@$#libsdl org:$(VERSION)$#@$(DESCRIPTION)'
  96. @%append $@ OPTION QUIET
  97. @%append $@ OPTION ELIMINATE
  98. @%append $@ OPTION MANYAUTODATA
  99. @%append $@ OPTION OSNAME='OS/2 and eComStation'
  100. @%append $@ OPTION SHOWDEAD
  101. clean: .SYMBOLIC
  102. @ echo * Clean: $(LIBNAME)
  103. @if exist *.obj rm *.obj
  104. @if exist *.err rm *.err
  105. @if exist $(LNKFILE) rm $(LNKFILE)
  106. @if exist $(LIBM) rm $(LIBM)
  107. distclean: .SYMBOLIC clean
  108. @if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
  109. @if exist $(LIBHOME)/*.map rm $(LIBHOME)/*.map
  110. @if exist $(LIBFILE) rm $(LIBFILE)
  111. @if exist $(DLLFILE) rm $(DLLFILE)