Skip to content
Browse files
Makefile.os2: build libm as a static lib and add it to linkage.
in case it is needed some day.
  • Loading branch information
sezero committed Nov 18, 2018
1 parent 457e58c commit ed8413c937fabd8e26570f3db3f30953573ba5a9
Showing with 13 additions and 2 deletions.
  1. +13 −2 Makefile.os2
@@ -15,7 +15,8 @@ INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
INCPATH+= -Iinclude

LIBS = mmpm2.lib libuls.lib libconv.lib
LIBM = libm.lib
LIBS = mmpm2.lib libuls.lib libconv.lib $(LIBM)

CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
# max warnings:
@@ -27,6 +28,10 @@ CFLAGS+= $(INCPATH)
# building SDL itself:

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 &
k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
s_atan.c s_copysign.c s_cos.c s_fabs.c s_floor.c s_scalbn.c s_sin.c s_tan.c

SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
@@ -56,6 +61,7 @@ SRCS+= SDL_dummysensor.c
SRCS+= SDL_dynapi.c

OBJS = $(SRCS:.c=.obj)
MOBJS= $(MSRCS:.c=.obj)

.extensions: .lib .dll .obj .c .asm
@@ -66,7 +72,7 @@ OBJS = $(SRCS:.c=.obj)

all: $(DLLFILE) $(LIBFILE) .symbolic

@echo * Linking: $@
wlink @$(LNKFILE)

@@ -95,6 +101,10 @@ SDL_blendpoint.obj: SDL_blendpoint.c
SDL_RLEaccel.obj: SDL_RLEaccel.c
wcc386 $(CFLAGS) -wcd=201 -fo=$^@ $<

.c: ./src/libm;
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)

@echo * Creating linker file: $@
@%create $@
@@ -118,6 +128,7 @@ clean: .SYMBOLIC
@if exist *.obj rm *.obj
@if exist *.err rm *.err
@if exist $(LNKFILE) rm $(LNKFILE)
@if exist $(LIBM) rm $(LIBM)

distclean: .SYMBOLIC clean
@if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp

0 comments on commit ed8413c

Please sign in to comment.