Makefile.os2
author Ozkan Sezer <sezeroz@gmail.com>
Tue, 30 Oct 2018 20:11:02 +0300
changeset 12373 8feb5da6f2fb
parent 12331 OWMakefile.os2@43d46306c3ba
child 12419 8fd9d8eeb968
permissions -rw-r--r--
rename os2 makefile so that 'make dist' catches it; update it a bit.
sezeroz@12373
     1
# Open Watcom makefile to build SDL2.dll for OS/2:
sezeroz@12373
     2
# wmake -f Makefile.os2
sezeroz@12329
     3
sezeroz@12373
     4
LIBNAME = SDL2
sezeroz@12373
     5
VERSION = 2.0.9
sezeroz@12373
     6
DESCRIPTION = Simple DirectMedia Layer 2
sezeroz@12373
     7
sezeroz@12373
     8
LIBHOME = .
sezeroz@12373
     9
LIBPATH = $(LIBHOME)/lib
sezeroz@12373
    10
DLLFILE = $(LIBHOME)/$(LIBNAME).dll
sezeroz@12373
    11
LIBFILE = $(LIBHOME)/$(LIBNAME).lib
sezeroz@12373
    12
LNKFILE = $(LIBNAME).lnk
sezeroz@12329
    13
sezeroz@12329
    14
INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
sezeroz@12373
    15
INCPATH+= -I"$(LIBHOME)/h"
sezeroz@12329
    16
INCPATH+= -Iinclude
sezeroz@12329
    17
sezeroz@12373
    18
LIBS = mmpm2.lib libuls.lib libconv.lib
sezeroz@12373
    19
sezeroz@12329
    20
CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
sezeroz@12329
    21
# max warnings:
sezeroz@12329
    22
CFLAGS+= -wx
sezeroz@12329
    23
# building dll:
sezeroz@12329
    24
CFLAGS+= -bd
sezeroz@12329
    25
# the include paths :
sezeroz@12329
    26
CFLAGS+= $(INCPATH)
sezeroz@12329
    27
# building SDL itself:
sezeroz@12329
    28
CFLAGS+= -DBUILD_SDL
sezeroz@12329
    29
sezeroz@12329
    30
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c
sezeroz@12329
    31
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c
sezeroz@12329
    32
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
sezeroz@12329
    33
SRCS+= SDL_rwops.c SDL_power.c
sezeroz@12329
    34
SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
sezeroz@12329
    35
SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
sezeroz@12329
    36
       SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
sezeroz@12329
    37
       SDL_sensor.c SDL_touch.c
sezeroz@12329
    38
SRCS+= SDL_haptic.c SDL_gamecontroller.c SDL_joystick.c
sezeroz@12329
    39
SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
sezeroz@12329
    40
       SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
sezeroz@12329
    41
       SDL_render_sw.c SDL_rotate.c
sezeroz@12329
    42
SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
sezeroz@12329
    43
       SDL_blit_copy.c SDL_blit_N.c SDL_blit_slow.c SDL_fillrect.c SDL_bmp.c &
sezeroz@12329
    44
       SDL_pixels.c SDL_rect.c SDL_RLEaccel.c SDL_shape.c SDL_stretch.c &
sezeroz@12329
    45
       SDL_surface.c SDL_video.c SDL_clipboard.c SDL_vulkan_utils.c SDL_egl.c
sezeroz@12329
    46
sezeroz@12329
    47
SRCS+= SDL_syscond.c SDL_sysmutex.c SDL_syssem.c SDL_systhread.c SDL_systls.c
sezeroz@12329
    48
SRCS+= SDL_systimer.c
sezeroz@12329
    49
SRCS+= SDL_sysloadso.c
sezeroz@12329
    50
SRCS+= SDL_sysfilesystem.c
sezeroz@12329
    51
SRCS+= SDL_syshaptic.c SDL_sysjoystick.c
sezeroz@12329
    52
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
sezeroz@12329
    53
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
sezeroz@12329
    54
SRCS+= SDL_dummysensor.c
sezeroz@12329
    55
sezeroz@12329
    56
SRCS+= SDL_dynapi.c
sezeroz@12329
    57
sezeroz@12329
    58
OBJS = $(SRCS:.c=.obj)
sezeroz@12329
    59
sezeroz@12331
    60
.extensions:
sezeroz@12331
    61
.extensions: .lib .dll .obj .c .asm
sezeroz@12331
    62
sezeroz@12373
    63
.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;
sezeroz@12373
    64
.c: ./src/haptic/dummy;./src/joystick/dummy;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
sezeroz@12373
    65
.c: ./src/loadso/dummy;./src/filesystem/dummy;./src/timer/dummy;./src/thread/generic;
sezeroz@12331
    66
sezeroz@12329
    67
all: $(DLLFILE) $(LIBFILE) .symbolic
sezeroz@12329
    68
sezeroz@12329
    69
$(DLLFILE): $(OBJS) $(LNKFILE)
sezeroz@12373
    70
    @echo * Linking: $@
sezeroz@12329
    71
    wlink @$(LNKFILE)
sezeroz@12329
    72
sezeroz@12373
    73
$(LIBFILE): $(DLLFILE)
sezeroz@12373
    74
    @echo * Creating LIB file: $@
sezeroz@12329
    75
    wlib -q -b -n -c -pa -s -t -zld -ii -io $* $(DLLFILE)
sezeroz@12329
    76
sezeroz@12329
    77
.c.obj:
sezeroz@12329
    78
    wcc386 $(CFLAGS) -fo=$^@ $<
sezeroz@12329
    79
sezeroz@12329
    80
SDL_cpuinfo.obj: SDL_cpuinfo.c
sezeroz@12329
    81
    wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
sezeroz@12329
    82
sezeroz@12329
    83
SDL_rwops.obj: SDL_rwops.c
sezeroz@12329
    84
    wcc386 $(CFLAGS) -wcd=136 -fo=$^@ $<
sezeroz@12329
    85
sezeroz@12329
    86
SDL_blendfillrect.obj: SDL_blendfillrect.c
sezeroz@12329
    87
    wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
sezeroz@12329
    88
sezeroz@12329
    89
SDL_blendline.obj: SDL_blendline.c
sezeroz@12329
    90
    wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
sezeroz@12329
    91
sezeroz@12329
    92
SDL_blendpoint.obj: SDL_blendpoint.c
sezeroz@12329
    93
    wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
sezeroz@12329
    94
sezeroz@12329
    95
SDL_RLEaccel.obj: SDL_RLEaccel.c
sezeroz@12329
    96
    wcc386 $(CFLAGS) -wcd=201 -fo=$^@ $<
sezeroz@12329
    97
sezeroz@12329
    98
$(LNKFILE):
sezeroz@12373
    99
    @echo * Creating linker file: $@
sezeroz@12329
   100
    @%create $@
sezeroz@12329
   101
    @%append $@ SYSTEM os2v2_dll INITINSTANCE TERMINSTANCE
sezeroz@12329
   102
    @%append $@ NAME $(DLLFILE)
sezeroz@12329
   103
    @for %i in ($(OBJS)) do @%append $@ FILE %i
sezeroz@12373
   104
    @%append $@ LIBPATH $(%LIB);$(LIBPATH)
sezeroz@12373
   105
    @for %i in ($(LIBS)) do @%append $@ LIB %i
sezeroz@12329
   106
    @%append $@ OPTION QUIET
sezeroz@12373
   107
    @%append $@ OPTION IMPF=$(LIBHOME)/$^&.exp
sezeroz@12373
   108
    @%append $@ OPTION MAP=$(LIBHOME)/$^&.map
sezeroz@12373
   109
    @%append $@ OPTION DESCRIPTION '@$#libsdl org:$(VERSION)$#@$(DESCRIPTION)'
sezeroz@12329
   110
    @%append $@ OPTION QUIET
sezeroz@12329
   111
    @%append $@ OPTION ELIMINATE
sezeroz@12329
   112
    @%append $@ OPTION MANYAUTODATA
sezeroz@12329
   113
    @%append $@ OPTION OSNAME='OS/2 and eComStation'
sezeroz@12329
   114
    @%append $@ OPTION SHOWDEAD
sezeroz@12329
   115
sezeroz@12329
   116
clean: .SYMBOLIC
sezeroz@12329
   117
    @ echo * Clean: $(LIBNAME)
sezeroz@12329
   118
    @if exist *.obj rm *.obj
sezeroz@12329
   119
    @if exist *.err rm *.err
sezeroz@12329
   120
    @if exist $(LNKFILE) rm $(LNKFILE)
sezeroz@12329
   121
sezeroz@12329
   122
distclean: .SYMBOLIC clean
sezeroz@12373
   123
    @if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
sezeroz@12373
   124
    @if exist $(LIBHOME)/*.map rm $(LIBHOME)/*.map
sezeroz@12373
   125
    @if exist $(LIBFILE) rm $(LIBFILE)
sezeroz@12329
   126
    @if exist $(DLLFILE) rm $(DLLFILE)