OWMakefile.os2
author Sam Lantinga <slouken@libsdl.org>
Fri, 26 Oct 2018 09:27:31 -0700
changeset 12360 a21c0a3bf183
parent 12331 43d46306c3ba
permissions -rw-r--r--
Don't build SDL_JOYSTICK_HIDAPI by default on iOS
If you enable this, you'll need to link with CoreBluetooth.framework and add something like this to your Info.plist:
<key>NSBluetoothPeripheralUsageDescription</key>
<string>MyApp would like to remain connected to nearby bluetooth Game Controllers and Game Pads even when you're not using the app.</string>
sezeroz@12329
     1
# Open Watcom Makefile to build a minimal OS/2 SDL2.dll
sezeroz@12329
     2
sezeroz@12329
     3
DLLFILE = SDL2.dll
sezeroz@12329
     4
IMPLIB  = SDL2.lib
sezeroz@12329
     5
MAPFILE = SDL2.map
sezeroz@12329
     6
EXPFILE = SDL2.exp
sezeroz@12329
     7
LNKFILE = SDL2.lnk
sezeroz@12329
     8
sezeroz@12329
     9
INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
sezeroz@12329
    10
INCPATH+= -Iinclude
sezeroz@12329
    11
sezeroz@12329
    12
CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
sezeroz@12329
    13
# max warnings:
sezeroz@12329
    14
CFLAGS+= -wx
sezeroz@12329
    15
# building dll:
sezeroz@12329
    16
CFLAGS+= -bd
sezeroz@12329
    17
# the include paths :
sezeroz@12329
    18
CFLAGS+= $(INCPATH)
sezeroz@12329
    19
# building SDL itself:
sezeroz@12329
    20
CFLAGS+= -DBUILD_SDL
sezeroz@12329
    21
sezeroz@12329
    22
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c
sezeroz@12329
    23
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c
sezeroz@12329
    24
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
sezeroz@12329
    25
SRCS+= SDL_rwops.c SDL_power.c
sezeroz@12329
    26
SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
sezeroz@12329
    27
SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
sezeroz@12329
    28
       SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
sezeroz@12329
    29
       SDL_sensor.c SDL_touch.c
sezeroz@12329
    30
SRCS+= SDL_haptic.c SDL_gamecontroller.c SDL_joystick.c
sezeroz@12329
    31
SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
sezeroz@12329
    32
       SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
sezeroz@12329
    33
       SDL_render_sw.c SDL_rotate.c
sezeroz@12329
    34
SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
sezeroz@12329
    35
       SDL_blit_copy.c SDL_blit_N.c SDL_blit_slow.c SDL_fillrect.c SDL_bmp.c &
sezeroz@12329
    36
       SDL_pixels.c SDL_rect.c SDL_RLEaccel.c SDL_shape.c SDL_stretch.c &
sezeroz@12329
    37
       SDL_surface.c SDL_video.c SDL_clipboard.c SDL_vulkan_utils.c SDL_egl.c
sezeroz@12329
    38
sezeroz@12329
    39
SRCS+= SDL_syscond.c SDL_sysmutex.c SDL_syssem.c SDL_systhread.c SDL_systls.c
sezeroz@12329
    40
SRCS+= SDL_systimer.c
sezeroz@12329
    41
SRCS+= SDL_sysloadso.c
sezeroz@12329
    42
SRCS+= SDL_sysfilesystem.c
sezeroz@12329
    43
SRCS+= SDL_syshaptic.c SDL_sysjoystick.c
sezeroz@12329
    44
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
sezeroz@12329
    45
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
sezeroz@12329
    46
SRCS+= SDL_dummysensor.c
sezeroz@12329
    47
sezeroz@12329
    48
SRCS+= SDL_dynapi.c
sezeroz@12329
    49
sezeroz@12329
    50
OBJS = $(SRCS:.c=.obj)
sezeroz@12329
    51
sezeroz@12331
    52
.extensions:
sezeroz@12331
    53
.extensions: .lib .dll .obj .c .asm
sezeroz@12331
    54
sezeroz@12331
    55
.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;
sezeroz@12331
    56
sezeroz@12329
    57
all: $(DLLFILE) $(LIBFILE) .symbolic
sezeroz@12329
    58
sezeroz@12329
    59
$(DLLFILE): $(OBJS) $(LNKFILE)
sezeroz@12329
    60
    wlink @$(LNKFILE)
sezeroz@12329
    61
sezeroz@12329
    62
$(IMPLIB): $(DLLFILE)
sezeroz@12329
    63
    wlib -q -b -n -c -pa -s -t -zld -ii -io $* $(DLLFILE)
sezeroz@12329
    64
sezeroz@12329
    65
.c.obj:
sezeroz@12329
    66
    wcc386 $(CFLAGS) -fo=$^@ $<
sezeroz@12329
    67
sezeroz@12329
    68
SDL_cpuinfo.obj: SDL_cpuinfo.c
sezeroz@12329
    69
    wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
sezeroz@12329
    70
sezeroz@12329
    71
SDL_rwops.obj: SDL_rwops.c
sezeroz@12329
    72
    wcc386 $(CFLAGS) -wcd=136 -fo=$^@ $<
sezeroz@12329
    73
sezeroz@12329
    74
SDL_blendfillrect.obj: SDL_blendfillrect.c
sezeroz@12329
    75
    wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
sezeroz@12329
    76
sezeroz@12329
    77
SDL_blendline.obj: SDL_blendline.c
sezeroz@12329
    78
    wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
sezeroz@12329
    79
sezeroz@12329
    80
SDL_blendpoint.obj: SDL_blendpoint.c
sezeroz@12329
    81
    wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
sezeroz@12329
    82
sezeroz@12329
    83
SDL_RLEaccel.obj: SDL_RLEaccel.c
sezeroz@12329
    84
    wcc386 $(CFLAGS) -wcd=201 -fo=$^@ $<
sezeroz@12329
    85
sezeroz@12329
    86
$(LNKFILE):
sezeroz@12329
    87
    @%create $@
sezeroz@12329
    88
    @%append $@ SYSTEM os2v2_dll INITINSTANCE TERMINSTANCE
sezeroz@12329
    89
    @%append $@ NAME $(DLLFILE)
sezeroz@12329
    90
    @for %i in ($(OBJS)) do @%append $@ FILE %i
sezeroz@12329
    91
    @%append $@ OPTION QUIET
sezeroz@12329
    92
    @%append $@ OPTION IMPF=$(EXPFILE)
sezeroz@12329
    93
    @%append $@ OPTION MAP=$(MAPFILE)
sezeroz@12329
    94
    @%append $@ OPTION QUIET
sezeroz@12329
    95
    @%append $@ OPTION ELIMINATE
sezeroz@12329
    96
    @%append $@ OPTION MANYAUTODATA
sezeroz@12329
    97
    @%append $@ OPTION OSNAME='OS/2 and eComStation'
sezeroz@12329
    98
    @%append $@ OPTION SHOWDEAD
sezeroz@12329
    99
sezeroz@12329
   100
clean: .SYMBOLIC
sezeroz@12329
   101
    @ echo * Clean: $(LIBNAME)
sezeroz@12329
   102
    @if exist *.obj rm *.obj
sezeroz@12329
   103
    @if exist *.err rm *.err
sezeroz@12329
   104
    @if exist $(LNKFILE) rm $(LNKFILE)
sezeroz@12329
   105
sezeroz@12329
   106
distclean: .SYMBOLIC clean
sezeroz@12329
   107
    @if exist $(MAPFILE) rm $(MAPFILE)
sezeroz@12329
   108
    @if exist $(EXPFILE) rm $(EXPFILE)
sezeroz@12329
   109
    @if exist $(IMPLIB) rm $(IMPLIB)
sezeroz@12329
   110
    @if exist $(DLLFILE) rm $(DLLFILE)