OWMakefile.os2
changeset 12329 b7243b9f8fd5
child 12331 43d46306c3ba
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/OWMakefile.os2	Sun Oct 14 23:56:56 2018 +0300
     1.3 @@ -0,0 +1,114 @@
     1.4 +# Open Watcom Makefile to build a minimal OS/2 SDL2.dll
     1.5 +
     1.6 +DLLFILE = SDL2.dll
     1.7 +IMPLIB  = SDL2.lib
     1.8 +MAPFILE = SDL2.map
     1.9 +EXPFILE = SDL2.exp
    1.10 +LNKFILE = SDL2.lnk
    1.11 +
    1.12 +INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
    1.13 +INCPATH+= -Iinclude
    1.14 +
    1.15 +CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
    1.16 +# max warnings:
    1.17 +CFLAGS+= -wx
    1.18 +# building dll:
    1.19 +CFLAGS+= -bd
    1.20 +# the include paths :
    1.21 +CFLAGS+= $(INCPATH)
    1.22 +# building SDL itself:
    1.23 +CFLAGS+= -DBUILD_SDL
    1.24 +
    1.25 +# this is so that build doesn't fail with E1112:
    1.26 +#CFLAGS+= -DSDL_POWER_DISABLED
    1.27 +CFLAGS+= -DSDL_POWER_HARDWIRED
    1.28 +
    1.29 +.extensions:
    1.30 +.extensions: .lib .dll .obj .c .asm
    1.31 +
    1.32 +.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/haptic/dummy;./src/joystick/dummy;./src/loadso/dummy;./src/filesystem/dummy;./src/thread/generic;./src/timer/dummy;./src/power;./src/power/os2;./src/atomic;./src/audio/dummy;./src/audio/disk;./src/video/dummy;./src/sensor/dummy;./src/test;
    1.33 +
    1.34 +SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c
    1.35 +SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c
    1.36 +SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
    1.37 +SRCS+= SDL_rwops.c SDL_power.c
    1.38 +SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
    1.39 +SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
    1.40 +       SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
    1.41 +       SDL_sensor.c SDL_touch.c
    1.42 +SRCS+= SDL_haptic.c SDL_gamecontroller.c SDL_joystick.c
    1.43 +SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
    1.44 +       SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
    1.45 +       SDL_render_sw.c SDL_rotate.c
    1.46 +SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
    1.47 +       SDL_blit_copy.c SDL_blit_N.c SDL_blit_slow.c SDL_fillrect.c SDL_bmp.c &
    1.48 +       SDL_pixels.c SDL_rect.c SDL_RLEaccel.c SDL_shape.c SDL_stretch.c &
    1.49 +       SDL_surface.c SDL_video.c SDL_clipboard.c SDL_vulkan_utils.c SDL_egl.c
    1.50 +
    1.51 +SRCS+= SDL_syscond.c SDL_sysmutex.c SDL_syssem.c SDL_systhread.c SDL_systls.c
    1.52 +SRCS+= SDL_systimer.c
    1.53 +SRCS+= SDL_sysloadso.c
    1.54 +SRCS+= SDL_sysfilesystem.c
    1.55 +SRCS+= SDL_syshaptic.c SDL_sysjoystick.c
    1.56 +SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
    1.57 +SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
    1.58 +SRCS+= SDL_dummysensor.c
    1.59 +
    1.60 +SRCS+= SDL_dynapi.c
    1.61 +
    1.62 +OBJS = $(SRCS:.c=.obj)
    1.63 +
    1.64 +all: $(DLLFILE) $(LIBFILE) .symbolic
    1.65 +
    1.66 +$(DLLFILE): $(OBJS) $(LNKFILE)
    1.67 +    wlink @$(LNKFILE)
    1.68 +
    1.69 +$(IMPLIB): $(DLLFILE)
    1.70 +    wlib -q -b -n -c -pa -s -t -zld -ii -io $* $(DLLFILE)
    1.71 +
    1.72 +.c.obj:
    1.73 +    wcc386 $(CFLAGS) -fo=$^@ $<
    1.74 +
    1.75 +SDL_cpuinfo.obj: SDL_cpuinfo.c
    1.76 +    wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
    1.77 +
    1.78 +SDL_rwops.obj: SDL_rwops.c
    1.79 +    wcc386 $(CFLAGS) -wcd=136 -fo=$^@ $<
    1.80 +
    1.81 +SDL_blendfillrect.obj: SDL_blendfillrect.c
    1.82 +    wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
    1.83 +
    1.84 +SDL_blendline.obj: SDL_blendline.c
    1.85 +    wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
    1.86 +
    1.87 +SDL_blendpoint.obj: SDL_blendpoint.c
    1.88 +    wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
    1.89 +
    1.90 +SDL_RLEaccel.obj: SDL_RLEaccel.c
    1.91 +    wcc386 $(CFLAGS) -wcd=201 -fo=$^@ $<
    1.92 +
    1.93 +$(LNKFILE):
    1.94 +    @%create $@
    1.95 +    @%append $@ SYSTEM os2v2_dll INITINSTANCE TERMINSTANCE
    1.96 +    @%append $@ NAME $(DLLFILE)
    1.97 +    @for %i in ($(OBJS)) do @%append $@ FILE %i
    1.98 +    @%append $@ OPTION QUIET
    1.99 +    @%append $@ OPTION IMPF=$(EXPFILE)
   1.100 +    @%append $@ OPTION MAP=$(MAPFILE)
   1.101 +    @%append $@ OPTION QUIET
   1.102 +    @%append $@ OPTION ELIMINATE
   1.103 +    @%append $@ OPTION MANYAUTODATA
   1.104 +    @%append $@ OPTION OSNAME='OS/2 and eComStation'
   1.105 +    @%append $@ OPTION SHOWDEAD
   1.106 +
   1.107 +clean: .SYMBOLIC
   1.108 +    @ echo * Clean: $(LIBNAME)
   1.109 +    @if exist *.obj rm *.obj
   1.110 +    @if exist *.err rm *.err
   1.111 +    @if exist $(LNKFILE) rm $(LNKFILE)
   1.112 +
   1.113 +distclean: .SYMBOLIC clean
   1.114 +    @if exist $(MAPFILE) rm $(MAPFILE)
   1.115 +    @if exist $(EXPFILE) rm $(EXPFILE)
   1.116 +    @if exist $(IMPLIB) rm $(IMPLIB)
   1.117 +    @if exist $(DLLFILE) rm $(DLLFILE)