2011-03-11 19:52:24 +01:00
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
|
2013-07-11 19:20:47 +02:00
|
|
|
CFLAGS = -c -O2 -fomit-frame-pointer -DBUILD_DLL
|
2013-09-10 21:07:11 +02:00
|
|
|
LDFLAGS = -nostdlib -shared -s -T libcdll.lds --output-def libc.orig.def --out-implib libc.dll.a --image-base 0
|
2011-03-11 19:52:24 +01:00
|
|
|
|
|
|
|
LIBC_TOPDIR = .
|
|
|
|
LIBC_INCLUDES = $(LIBC_TOPDIR)/include
|
|
|
|
|
|
|
|
NAME:= libc
|
|
|
|
|
2013-03-11 19:13:25 +01:00
|
|
|
DEFINES:= -D_IEEE_LIBM
|
2012-11-26 11:18:42 +01:00
|
|
|
|
|
|
|
INCLUDES:= -I $(LIBC_INCLUDES)
|
|
|
|
|
2013-06-03 19:15:09 +02:00
|
|
|
STATIC_SRCS:= \
|
2012-11-26 11:18:42 +01:00
|
|
|
crt/start.S \
|
|
|
|
crt/crt1.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
crt/crt2.c \
|
|
|
|
crt/chkstk.S \
|
2012-11-26 11:18:42 +01:00
|
|
|
crt/exit.S \
|
2013-07-10 21:26:24 +02:00
|
|
|
pe/crtloader.c
|
2012-11-26 11:18:42 +01:00
|
|
|
|
2013-07-11 19:20:47 +02:00
|
|
|
LIBDLL_SRCS:= \
|
|
|
|
crt/dllstart.c \
|
|
|
|
crt/chkstk.S \
|
|
|
|
crt/exit.S \
|
2013-07-11 12:17:41 +02:00
|
|
|
crt/pseudo-reloc.c \
|
2013-07-11 19:20:47 +02:00
|
|
|
crt/setjmp.S
|
2013-07-10 21:26:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
LIBCDLL_SRCS:= \
|
|
|
|
crt/crtdll.c \
|
|
|
|
crt/pseudo-reloc.c \
|
|
|
|
crt/chkstk.S \
|
2013-06-03 19:15:09 +02:00
|
|
|
crt/exit.S \
|
|
|
|
pe/loader.c
|
2012-11-26 11:18:42 +01:00
|
|
|
|
2013-07-10 21:26:24 +02:00
|
|
|
LIBCRT_SRCS:= \
|
|
|
|
crt/start.S \
|
|
|
|
crt/chkstk.S \
|
|
|
|
crt/crt3.c \
|
2013-09-10 21:07:11 +02:00
|
|
|
crt/pseudo-reloc.c \
|
2013-07-10 21:26:24 +02:00
|
|
|
pe/crtloader.c
|
|
|
|
|
2013-06-03 19:15:09 +02:00
|
|
|
CORE_SRCS:= \
|
2011-03-11 19:52:24 +01:00
|
|
|
argz/buf_findstr.c \
|
|
|
|
argz/envz_get.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
crt/emutls.c \
|
|
|
|
crt/thread.S \
|
|
|
|
crt/tls.S \
|
2013-07-10 21:26:24 +02:00
|
|
|
crt/setjmp.S \
|
2013-06-03 19:15:09 +02:00
|
|
|
crt/assert.c \
|
2011-03-11 19:52:24 +01:00
|
|
|
crt/cpu_features.c \
|
|
|
|
ctype/ctype_.c \
|
|
|
|
ctype/isascii.c \
|
|
|
|
ctype/isblank.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
ctype/isalnum.c \
|
|
|
|
ctype/isalpha.c \
|
|
|
|
ctype/iscntrl.c \
|
|
|
|
ctype/isdigit.c \
|
|
|
|
ctype/islower.c \
|
|
|
|
ctype/isupper.c \
|
|
|
|
ctype/isprint.c \
|
|
|
|
ctype/ispunct.c \
|
|
|
|
ctype/isspace.c \
|
|
|
|
ctype/iswctype.c \
|
|
|
|
ctype/iswalnum.c \
|
|
|
|
ctype/iswalpha.c \
|
|
|
|
ctype/iswblank.c \
|
|
|
|
ctype/iswcntrl.c \
|
|
|
|
ctype/iswdigit.c \
|
|
|
|
ctype/iswgraph.c \
|
|
|
|
ctype/iswlower.c \
|
|
|
|
ctype/iswprint.c \
|
|
|
|
ctype/iswpunct.c \
|
|
|
|
ctype/iswspace.c \
|
|
|
|
ctype/iswupper.c \
|
|
|
|
ctype/iswxdigit.c \
|
|
|
|
ctype/isxdigit.c \
|
2011-03-11 19:52:24 +01:00
|
|
|
ctype/toascii.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
ctype/tolower.c \
|
2011-03-11 19:52:24 +01:00
|
|
|
ctype/toupper.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
ctype/towctrans.c \
|
|
|
|
ctype/towlower.c \
|
|
|
|
ctype/towupper.c \
|
2011-03-11 19:52:24 +01:00
|
|
|
ctype/wctrans.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
ctype/wctype.c \
|
|
|
|
errno/errno.c \
|
2011-03-11 19:52:24 +01:00
|
|
|
locale/locale.c \
|
|
|
|
locale/lctype.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
reent/impure.c \
|
|
|
|
reent/init_reent.c \
|
|
|
|
reent/getreent.c \
|
|
|
|
reent/mutex.c \
|
2011-03-11 19:52:24 +01:00
|
|
|
reent/gettimeofdayr.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
reent/hdlman.c \
|
2011-03-11 19:52:24 +01:00
|
|
|
reent/isattyr.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
reent/openr.c \
|
|
|
|
reent/closer.c \
|
|
|
|
reent/readr.c \
|
|
|
|
reent/lseekr.c \
|
|
|
|
reent/fstatr.c \
|
|
|
|
reent/writer.c \
|
|
|
|
search/qsort.c \
|
|
|
|
search/bsearch.c \
|
2011-03-11 19:52:24 +01:00
|
|
|
signal/signal.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
sys/create.c \
|
|
|
|
sys/delete.c \
|
|
|
|
sys/finfo.c \
|
|
|
|
sys/read.c \
|
|
|
|
sys/write.c \
|
|
|
|
sys/fsize.c \
|
|
|
|
time/asctime.c \
|
|
|
|
time/asctime_r.c \
|
|
|
|
time/clock.c \
|
|
|
|
time/ctime.c \
|
|
|
|
time/ctime_r.c \
|
2011-03-11 19:52:24 +01:00
|
|
|
time/difftime.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
time/gettzinfo.c \
|
|
|
|
time/gmtime.c \
|
2011-03-11 19:52:24 +01:00
|
|
|
time/gmtime_r.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
time/mktime.c \
|
|
|
|
time/mktm_r.c \
|
|
|
|
time/lcltime.c \
|
|
|
|
time/lcltime_r.c \
|
2011-03-11 19:52:24 +01:00
|
|
|
time/strftime.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
time/time.c \
|
|
|
|
time/tzlock.c \
|
2013-09-10 21:07:11 +02:00
|
|
|
time/tzvars.c
|
2012-11-26 11:18:42 +01:00
|
|
|
|
|
|
|
|
2013-06-03 19:15:09 +02:00
|
|
|
STDLIB_SRCS= \
|
2012-11-26 11:18:42 +01:00
|
|
|
__atexit.c \
|
|
|
|
__call_atexit.c \
|
|
|
|
abort.c \
|
|
|
|
abs.c \
|
|
|
|
atof.c \
|
|
|
|
atoi.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
atol.c \
|
2012-11-26 11:18:42 +01:00
|
|
|
div.c \
|
|
|
|
dtoa.c \
|
|
|
|
dtoastub.c \
|
|
|
|
exit.c \
|
|
|
|
gdtoa-gethex.c \
|
|
|
|
gdtoa-hexnan.c \
|
|
|
|
getenv.c \
|
|
|
|
mprec.c \
|
|
|
|
mbtowc.c \
|
|
|
|
mbtowc_r.c \
|
|
|
|
mbrtowc.c \
|
|
|
|
mlock.c \
|
|
|
|
calloc.c \
|
|
|
|
malloc.c \
|
|
|
|
mallocr.c \
|
|
|
|
rand.c \
|
|
|
|
rand_r.c \
|
|
|
|
rand48.c \
|
|
|
|
realloc.c \
|
|
|
|
seed48.c \
|
|
|
|
srand48.c \
|
|
|
|
strtod.c \
|
|
|
|
strtol.c \
|
|
|
|
strtold.c \
|
|
|
|
strtoll.c \
|
|
|
|
strtoll_r.c \
|
|
|
|
strtoul.c \
|
|
|
|
strtoull.c \
|
|
|
|
strtoull_r.c \
|
|
|
|
system.c \
|
|
|
|
wcrtomb.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
wctomb_r.c
|
2012-11-26 11:18:42 +01:00
|
|
|
|
|
|
|
|
2013-09-10 21:07:11 +02:00
|
|
|
STRING_SRCS= memcpy.c \
|
|
|
|
memcmp.c \
|
|
|
|
memmove.c \
|
|
|
|
memset.c \
|
|
|
|
memchr.c \
|
|
|
|
stpcpy.c \
|
|
|
|
stpncpy.c \
|
|
|
|
strcat.c \
|
|
|
|
strchr.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
strcmp.c \
|
|
|
|
strcoll.c \
|
|
|
|
strcasecmp.c \
|
|
|
|
strncasecmp.c \
|
|
|
|
strncat.c \
|
|
|
|
strncmp.c \
|
|
|
|
strncpy.c \
|
|
|
|
strndup.c \
|
|
|
|
strndup_r.c \
|
|
|
|
strnlen.c \
|
|
|
|
strcasestr.c \
|
|
|
|
strdup.c \
|
|
|
|
strdup_r.c \
|
|
|
|
strerror.c \
|
|
|
|
strlen.c \
|
|
|
|
strrchr.c \
|
|
|
|
strpbrk.c \
|
|
|
|
strsep.c \
|
|
|
|
strstr.c \
|
|
|
|
strtok.c \
|
|
|
|
strtok_r.c \
|
|
|
|
strupr.c \
|
|
|
|
strcspn.c \
|
|
|
|
strspn.c \
|
|
|
|
strcpy.c \
|
2011-03-11 19:52:24 +01:00
|
|
|
u_strerr.c
|
|
|
|
|
2013-06-03 19:15:09 +02:00
|
|
|
STDIO_SRCS= \
|
2012-11-26 11:18:42 +01:00
|
|
|
clearerr.c \
|
|
|
|
diprintf.c \
|
|
|
|
dprintf.c \
|
|
|
|
printf.c \
|
|
|
|
putchar.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
fgetc.c \
|
|
|
|
fgets.c \
|
|
|
|
fopen.c \
|
2012-11-26 11:18:42 +01:00
|
|
|
fclose.c \
|
|
|
|
fdopen.c \
|
|
|
|
fflush.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
flags.c \
|
2012-11-26 11:18:42 +01:00
|
|
|
fileno.c \
|
|
|
|
findfp.c \
|
|
|
|
fiprintf.c \
|
|
|
|
fiscanf.c \
|
|
|
|
fprintf.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
fputc.c \
|
|
|
|
fputs.c \
|
2012-11-26 11:18:42 +01:00
|
|
|
fputwc.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
fread.c \
|
2012-11-26 11:18:42 +01:00
|
|
|
freopen.c \
|
|
|
|
fscanf.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
fseek.c \
|
2012-11-26 11:18:42 +01:00
|
|
|
fseeko.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
ftell.c \
|
2012-11-26 11:18:42 +01:00
|
|
|
ftello.c \
|
|
|
|
fwrite.c \
|
|
|
|
fvwrite.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
fwalk.c \
|
|
|
|
putc.c \
|
|
|
|
puts.c \
|
2012-11-26 11:18:42 +01:00
|
|
|
refill.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
rget.c \
|
2012-11-26 11:18:42 +01:00
|
|
|
remove.c \
|
|
|
|
rename.c \
|
|
|
|
setvbuf.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
stdio.c \
|
2012-11-26 11:18:42 +01:00
|
|
|
tmpfile.c \
|
|
|
|
tmpnam.c \
|
|
|
|
ungetc.c \
|
2013-07-10 11:35:47 +02:00
|
|
|
vasniprintf.c \
|
|
|
|
vasnprintf.c \
|
|
|
|
vdprintf.c \
|
|
|
|
vdiprintf.c \
|
2012-11-26 11:18:42 +01:00
|
|
|
vscanf.c \
|
|
|
|
vsprintf.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
vsnprintf.c \
|
2012-11-26 11:18:42 +01:00
|
|
|
vsscanf.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
makebuf.c \
|
2012-11-26 11:18:42 +01:00
|
|
|
wsetup.c \
|
2013-06-03 19:15:09 +02:00
|
|
|
wbuf.c \
|
|
|
|
sccl.c \
|
2013-07-10 11:35:47 +02:00
|
|
|
siprintf.c \
|
2012-11-26 11:18:42 +01:00
|
|
|
sniprintf.c \
|
|
|
|
snprintf.c \
|
|
|
|
sprintf.c \
|
2011-03-11 19:52:24 +01:00
|
|
|
sscanf.c
|
2012-11-26 11:18:42 +01:00
|
|
|
|
2011-03-11 19:52:24 +01:00
|
|
|
|
2013-03-11 19:13:25 +01:00
|
|
|
MATH_SRCS = e_acos.c e_acosh.c e_asin.c e_atan2.c e_atanh.c e_cosh.c e_exp.c e_fmod.c \
|
|
|
|
e_hypot.c e_j0.c e_j1.c e_jn.c e_log.c e_log10.c e_pow.c e_rem_pio2.c \
|
|
|
|
e_remainder.c e_scalb.c e_sinh.c e_sqrt.c ef_acos.c ef_acosh.c ef_asin.c \
|
|
|
|
ef_atan2.c ef_atanh.c ef_cosh.c ef_exp.c ef_fmod.c ef_hypot.c ef_j0.c ef_j1.c \
|
|
|
|
ef_jn.c ef_log.c ef_log10.c ef_pow.c ef_rem_pio2.c ef_remainder.c ef_scalb.c \
|
|
|
|
ef_sinh.c ef_sqrt.c er_gamma.c er_lgamma.c erf_gamma.c erf_lgamma.c f_exp.c \
|
|
|
|
f_expf.c f_llrint.c f_llrintf.c f_llrintl.c f_lrint.c f_lrintf.c f_lrintl.c \
|
|
|
|
f_pow.c f_powf.c f_rint.c f_rintf.c f_rintl.c k_cos.c k_rem_pio2.c k_sin.c \
|
|
|
|
k_standard.c k_tan.c kf_cos.c kf_rem_pio2.c kf_sin.c kf_tan.c s_asinh.c \
|
|
|
|
s_atan.c s_cbrt.c s_ceil.c s_copysign.c s_cos.c s_erf.c s_exp10.c s_expm1.c \
|
|
|
|
s_fabs.c s_fdim.c s_finite.c s_floor.c s_fma.c s_fmax.c s_fmin.c s_fpclassify.c \
|
|
|
|
s_frexp.c s_ilogb.c s_infconst.c s_infinity.c s_isinf.c s_isinfd.c s_isnan.c \
|
|
|
|
s_isnand.c s_ldexp.c s_lib_ver.c s_llrint.c s_llround.c s_log1p.c s_log2.c \
|
|
|
|
s_logb.c s_lrint.c s_lround.c s_matherr.c s_modf.c s_nan.c s_nearbyint.c \
|
|
|
|
s_nextafter.c s_pow10.c s_remquo.c s_rint.c s_round.c s_scalbln.c s_scalbn.c \
|
|
|
|
s_signbit.c s_signif.c s_sin.c s_tan.c s_tanh.c s_trunc.c scalblnl.c scalbnl.c \
|
|
|
|
sf_asinh.c sf_atan.c sf_cbrt.c sf_ceil.c sf_copysign.c sf_cos.c sf_erf.c \
|
|
|
|
sf_exp10.c sf_expm1.c sf_fabs.c sf_fdim.c sf_finite.c sf_floor.c sf_fma.c \
|
|
|
|
sf_fmax.c sf_fmin.c sf_fpclassify.c sf_frexp.c sf_ilogb.c sf_infinity.c \
|
|
|
|
sf_isinf.c sf_isinff.c sf_isnan.c sf_isnanf.c sf_ldexp.c sf_llrint.c \
|
|
|
|
sf_llround.c sf_log1p.c sf_log2.c sf_logb.c sf_lrint.c sf_lround.c sf_modf.c \
|
|
|
|
sf_nan.c sf_nearbyint.c sf_nextafter.c sf_pow10.c sf_remquo.c sf_rint.c \
|
|
|
|
sf_round.c sf_scalbln.c sf_scalbn.c sf_signif.c sf_sin.c sf_tan.c sf_tanh.c \
|
|
|
|
sf_trunc.c w_acos.c w_acosh.c w_asin.c w_atan2.c w_atanh.c w_cosh.c w_drem.c \
|
|
|
|
w_exp.c w_exp2.c w_fmod.c w_gamma.c w_hypot.c w_j0.c w_j1.c w_jn.c w_lgamma.c \
|
|
|
|
w_log.c w_log10.c w_pow.c w_remainder.c w_scalb.c w_sincos.c w_sinh.c w_sqrt.c \
|
|
|
|
w_tgamma.c wf_acos.c wf_acosh.c wf_asin.c wf_atan2.c wf_atanh.c wf_cosh.c \
|
|
|
|
wf_drem.c wf_exp.c wf_exp2.c wf_fmod.c wf_gamma.c wf_hypot.c wf_j0.c wf_j1.c \
|
|
|
|
wf_jn.c wf_lgamma.c wf_log.c wf_log10.c wf_pow.c wf_remainder.c wf_scalb.c \
|
|
|
|
wf_sincos.c wf_sinh.c wf_sqrt.c wf_tgamma.c wr_gamma.c wr_lgamma.c wrf_gamma.c \
|
|
|
|
wrf_lgamma.c \
|
|
|
|
f_atan2.S f_atan2f.S f_frexp.S f_frexpf.S f_ldexp.S f_ldexpf.S f_log.S \
|
|
|
|
f_log10.S f_log10f.S f_logf.S f_tan.S f_tanf.S
|
2011-03-11 19:52:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
STATIC_OBJS = $(patsubst %.S, %.o, $(patsubst %.c, %.o, $(STATIC_SRCS)))
|
|
|
|
|
2013-07-10 21:26:24 +02:00
|
|
|
LIBCRT_OBJS = $(patsubst %.S, %.o, $(patsubst %.c, %.o, $(LIBCRT_SRCS)))
|
|
|
|
|
2013-07-11 19:20:47 +02:00
|
|
|
LIBDLL_OBJS = $(patsubst %.S, %.o, $(patsubst %.c, %.o, $(LIBDLL_SRCS)))
|
2011-03-11 19:52:24 +01:00
|
|
|
|
2013-07-10 21:26:24 +02:00
|
|
|
LIBCDLL_OBJS = $(patsubst %.S, %.o, $(patsubst %.c, %.o, $(LIBCDLL_SRCS)))
|
|
|
|
|
2011-03-11 19:52:24 +01:00
|
|
|
CORE_OBJS = $(patsubst %.S, %.o, $(patsubst %.asm, %.obj,\
|
|
|
|
$(patsubst %.c, %.o, $(CORE_SRCS))))
|
|
|
|
|
|
|
|
STDIO_OBJS = $(patsubst %.c, stdio/%.o,$(STDIO_SRCS))
|
|
|
|
|
|
|
|
|
|
|
|
STRING_OBJS = $(patsubst %.S, string/%.o, $(patsubst %.asm, string/%.o,\
|
|
|
|
$(patsubst %.c, string/%.o, $(STRING_SRCS))))
|
|
|
|
|
|
|
|
STDLIB_OBJS = $(patsubst %.S, stdlib/%.o, $(patsubst %.asm, stdlib/%.o,\
|
|
|
|
$(patsubst %.c, stdlib/%.o, $(STDLIB_SRCS))))
|
|
|
|
|
|
|
|
|
|
|
|
MATH_OBJS = $(patsubst %.S, math/%.o, $(patsubst %.asm, math/%.o,\
|
|
|
|
$(patsubst %.c, math/%.o, $(MATH_SRCS))))
|
|
|
|
|
|
|
|
|
|
|
|
PRINTF_OBJS= stdio/vfprintf.o \
|
|
|
|
stdio/vfiprintf.o \
|
|
|
|
stdio/svfprintf.o \
|
|
|
|
stdio/svfiprintf.o \
|
|
|
|
stdio/vfscanf.o \
|
|
|
|
stdio/vfiscanf.o \
|
|
|
|
stdio/svscanf.o \
|
|
|
|
stdio/svfiscanf.o
|
|
|
|
|
|
|
|
ifeq ($(findstring static,$(MAKECMDGOALS)),static)
|
|
|
|
|
|
|
|
LIB_SRCS:= $(STATIC_SRCS)
|
|
|
|
LIB_OBJS:= $(STATIC_OBJS)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
2013-07-10 21:26:24 +02:00
|
|
|
LIB_SRCS:= $(LIBCDLL_SRCS)
|
|
|
|
LIB_OBJS:= $(LIBCDLL_OBJS)
|
2011-03-11 19:52:24 +01:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
LIB_SRCS+= \
|
|
|
|
$(CORE_SRCS) \
|
|
|
|
$(STDIO_SRCS) \
|
|
|
|
$(STRING_SRCS) \
|
|
|
|
$(STDLIB_SRCS)
|
|
|
|
|
|
|
|
LIB_OBJS+= \
|
|
|
|
$(CORE_OBJS) \
|
|
|
|
$(STRING_OBJS) \
|
|
|
|
$(STDLIB_OBJS) \
|
|
|
|
$(STDIO_OBJS) \
|
|
|
|
$(PRINTF_OBJS) \
|
|
|
|
$(MATH_OBJS)
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-11 12:17:41 +02:00
|
|
|
shared: $(NAME).dll libcrt.a libdll.a
|
2011-03-11 19:52:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
$(NAME).dll: $(LIB_OBJS) $(SRC_DEP) Makefile
|
2013-09-10 21:07:11 +02:00
|
|
|
ld $(LDFLAGS) --exclude-symbols __chkstk,__chkstk_ms,_alloca -Map libcmap -L. -o $@ $(LIB_OBJS) -lgcc --version-script libc.ver
|
|
|
|
sed -e "s/ @[^ ]*//" libc.orig.def > libc.def
|
|
|
|
sed -f cmd1.sed libc.def > mem
|
|
|
|
sed -f cmd2.sed mem >libc.inc
|
2011-03-11 19:52:24 +01:00
|
|
|
|
|
|
|
|
2013-07-10 21:26:24 +02:00
|
|
|
libcrt.a: $(LIBCRT_OBJS) Makefile
|
|
|
|
ar rc libcrt.a $(LIBCRT_OBJS)
|
|
|
|
|
2013-07-11 19:20:47 +02:00
|
|
|
libdll.a: $(LIBDLL_OBJS) Makefile
|
|
|
|
ar rc libdll.a $(LIBDLL_OBJS)
|
2011-03-12 10:36:46 +01:00
|
|
|
|
2011-03-11 19:52:24 +01:00
|
|
|
|
|
|
|
static: $(NAME).a
|
|
|
|
|
|
|
|
$(NAME).a: $(LIB_OBJS) $(SRC_DEP) Makefile
|
|
|
|
ar rc $(NAME).a $(LIB_OBJS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
stdio/vfprintf.o: stdio/vfprintf.c
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums -DFLOATING_POINT -c stdio/vfprintf.c -o $@
|
|
|
|
|
|
|
|
stdio/vfiprintf.o: stdio/vfprintf.c
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums -DINTEGER_ONLY -c stdio/vfprintf.c -o $@
|
|
|
|
|
|
|
|
stdio/svfprintf.o: stdio/vfprintf.c
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums -DSTRING_ONLY -c stdio/vfprintf.c -o $@
|
|
|
|
|
|
|
|
stdio/svfiprintf.o: stdio/vfprintf.c
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums -DINTEGER_ONLY -DSTRING_ONLY -c stdio/vfprintf.c -o $@
|
|
|
|
|
|
|
|
|
|
|
|
stdio/vfscanf.o: stdio/vfscanf.c
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) stdio/vfscanf.c -o $@
|
|
|
|
|
|
|
|
stdio/vfiscanf.o: stdio/vfscanf.c
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -DINTEGER_ONLY $(INCLUDES) stdio/vfscanf.c -o $@
|
|
|
|
|
|
|
|
stdio/svscanf.o: stdio/vfscanf.c
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -DSTRING_ONLY $(INCLUDES) stdio/vfscanf.c -o $@
|
|
|
|
|
|
|
|
|
|
|
|
stdio/svfiscanf.o: stdio/vfscanf.c
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -DINTEGER_ONLY -DSTRING_ONLY $(INCLUDES) stdio/vfscanf.c -o $@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%.obj : %.asm Makefile
|
2013-03-11 19:13:25 +01:00
|
|
|
fasm $< $
|
2011-03-11 19:52:24 +01:00
|
|
|
|
|
|
|
%.o : %.c Makefile
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
|
|
|
|
|
|
|
|
|
2012-11-26 11:18:42 +01:00
|
|
|
clean:
|
|
|
|
-rm -f */*.o
|
2011-03-11 19:52:24 +01:00
|
|
|
|
|
|
|
|
2013-03-11 19:13:25 +01:00
|
|
|
|
|
|
|
|