Makefile.os2
changeset 12419 8fd9d8eeb968
parent 12373 8feb5da6f2fb
child 12425 266c5fbe0bbd
equal deleted inserted replaced
12418:03fc24848a71 12419:8fd9d8eeb968
    13 
    13 
    14 INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
    14 INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
    15 INCPATH+= -I"$(LIBHOME)/h"
    15 INCPATH+= -I"$(LIBHOME)/h"
    16 INCPATH+= -Iinclude
    16 INCPATH+= -Iinclude
    17 
    17 
    18 LIBS = mmpm2.lib libuls.lib libconv.lib
    18 LIBM = libm.lib
       
    19 LIBS = mmpm2.lib libuls.lib libconv.lib $(LIBM)
    19 
    20 
    20 CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
    21 CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
    21 # max warnings:
    22 # max warnings:
    22 CFLAGS+= -wx
    23 CFLAGS+= -wx
    23 # building dll:
    24 # building dll:
    24 CFLAGS+= -bd
    25 CFLAGS+= -bd
    25 # the include paths :
    26 # the include paths :
    26 CFLAGS+= $(INCPATH)
    27 CFLAGS+= $(INCPATH)
    27 # building SDL itself:
    28 # building SDL itself:
    28 CFLAGS+= -DBUILD_SDL
    29 CFLAGS+= -DBUILD_SDL
       
    30 
       
    31 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 &
       
    32        k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
       
    33        s_atan.c s_copysign.c s_cos.c s_fabs.c s_floor.c s_scalbn.c s_sin.c s_tan.c
    29 
    34 
    30 SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c
    35 SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c
    31 SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c
    36 SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c
    32 SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
    37 SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
    33 SRCS+= SDL_rwops.c SDL_power.c
    38 SRCS+= SDL_rwops.c SDL_power.c
    54 SRCS+= SDL_dummysensor.c
    59 SRCS+= SDL_dummysensor.c
    55 
    60 
    56 SRCS+= SDL_dynapi.c
    61 SRCS+= SDL_dynapi.c
    57 
    62 
    58 OBJS = $(SRCS:.c=.obj)
    63 OBJS = $(SRCS:.c=.obj)
       
    64 MOBJS= $(MSRCS:.c=.obj)
    59 
    65 
    60 .extensions:
    66 .extensions:
    61 .extensions: .lib .dll .obj .c .asm
    67 .extensions: .lib .dll .obj .c .asm
    62 
    68 
    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;
    69 .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;
    64 .c: ./src/haptic/dummy;./src/joystick/dummy;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
    70 .c: ./src/haptic/dummy;./src/joystick/dummy;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
    65 .c: ./src/loadso/dummy;./src/filesystem/dummy;./src/timer/dummy;./src/thread/generic;
    71 .c: ./src/loadso/dummy;./src/filesystem/dummy;./src/timer/dummy;./src/thread/generic;
    66 
    72 
    67 all: $(DLLFILE) $(LIBFILE) .symbolic
    73 all: $(DLLFILE) $(LIBFILE) .symbolic
    68 
    74 
    69 $(DLLFILE): $(OBJS) $(LNKFILE)
    75 $(DLLFILE): $(OBJS) $(LIBM) $(LNKFILE)
    70     @echo * Linking: $@
    76     @echo * Linking: $@
    71     wlink @$(LNKFILE)
    77     wlink @$(LNKFILE)
    72 
    78 
    73 $(LIBFILE): $(DLLFILE)
    79 $(LIBFILE): $(DLLFILE)
    74     @echo * Creating LIB file: $@
    80     @echo * Creating LIB file: $@
    93     wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
    99     wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
    94 
   100 
    95 SDL_RLEaccel.obj: SDL_RLEaccel.c
   101 SDL_RLEaccel.obj: SDL_RLEaccel.c
    96     wcc386 $(CFLAGS) -wcd=201 -fo=$^@ $<
   102     wcc386 $(CFLAGS) -wcd=201 -fo=$^@ $<
    97 
   103 
       
   104 .c: ./src/libm;
       
   105 $(LIBM): $(MOBJS)
       
   106     wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
       
   107 
    98 $(LNKFILE):
   108 $(LNKFILE):
    99     @echo * Creating linker file: $@
   109     @echo * Creating linker file: $@
   100     @%create $@
   110     @%create $@
   101     @%append $@ SYSTEM os2v2_dll INITINSTANCE TERMINSTANCE
   111     @%append $@ SYSTEM os2v2_dll INITINSTANCE TERMINSTANCE
   102     @%append $@ NAME $(DLLFILE)
   112     @%append $@ NAME $(DLLFILE)
   116 clean: .SYMBOLIC
   126 clean: .SYMBOLIC
   117     @ echo * Clean: $(LIBNAME)
   127     @ echo * Clean: $(LIBNAME)
   118     @if exist *.obj rm *.obj
   128     @if exist *.obj rm *.obj
   119     @if exist *.err rm *.err
   129     @if exist *.err rm *.err
   120     @if exist $(LNKFILE) rm $(LNKFILE)
   130     @if exist $(LNKFILE) rm $(LNKFILE)
       
   131     @if exist $(LIBM) rm $(LIBM)
   121 
   132 
   122 distclean: .SYMBOLIC clean
   133 distclean: .SYMBOLIC clean
   123     @if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
   134     @if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
   124     @if exist $(LIBHOME)/*.map rm $(LIBHOME)/*.map
   135     @if exist $(LIBHOME)/*.map rm $(LIBHOME)/*.map
   125     @if exist $(LIBFILE) rm $(LIBFILE)
   136     @if exist $(LIBFILE) rm $(LIBFILE)