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