SRC_CURS = $(shell find curses -name '*.c')
-SRC_LM = vfscanf.c vfprintf.c
-OBJ_LM = vfscanf-libm.o vfprintf-libm.o
+SRC_LM += acosf.c acoshf.c asinf.c asinhf.c atan2f.c atanf.c atanhf.c
+SRC_LM += cbrtf.c ceilf.c copysignf.c erff.c expf.c expm1f.c
+SRC_LM += fabsf.c fdimf.c floorf.c fmaxf.c fminf.c fmodf.c frexpf.c
+SRC_LM += hypotf.c ilogbf.c j0f.c j1f.c jnf.c
+SRC_LM += ldexpf.c lgammaf.c lgammaf_r.c logf.c log2f.c log10f.c logbf.c
+SRC_LM += lrintf.c lroundf.c
+SRC_LM += modff.c nearbyintf.c nextafterf.c powf.c
+SRC_LM += remainderf.c remquof.c rintf.c roundf.c
+SRC_LM += scalbnf.c scalbinf.c
+SRC_LM += sinf.c sincosf.c sinhf.c
+SRC_LM += sqrtf.c tgammaf.c
+SRC_LM += vfscanf_m.c vfprintf_m.c
+SRC_LM += __expo2f.c __float_bits.c __fpclassifyf.c __log1pf.c __signgam.c
+
OBJ_C = $(SRC_C:.c=.o)
OBJ_CURS = $(SRC_CURS:.c=.o)
OBJ_CT = $(SRC_CT:.c=.o)
+OBJ_LM = $(SRC_LM:.c=.o)
OBJ_HARD = $(SRC_HARD:.c=.o)
-OBJ_ALL = $(OBJ_ASM) $(OBJ_C) $(OBJ_HARD)
+OBJ_ALL = $(OBJ_ASM) $(OBJ_C) $(OBJ_HARD) $(OBJ_LM)
all: syslib$(PLATFORM).lib liberror.txt $(OBJ_CRT0) curses$(PLATFORM).lib termcap$(PLATFORM).lib m$(PLATFORM).lib
$(OBJ_CURS):%.o: %.c
$(CC) $(CC_OPT) $(@:.o=.c) -o $@
-vfscanf-libm.o: vfscanf.c
- $(CC) $(CC_OPT) -DBUILD_LIBM $< -o $@
-
-vfprintf-libm.o: vfprintf.c
- $(CC) $(CC_OPT) -DBUILD_LIBM $< -o $@
+$(OBJ_LM):%.o: %.c
+ $(CC) $(CC_OPT) -DBUILD_LIBM $(@:.o=.c) -o $@
$(OBJ_HARD):%.o: %.c
$(CC) $(CC_NOOPT) $(@:.o=.c)