1 # Port specification for the mcs51 port running with uCsim
3 # model small stack-auto
5 LIBSRCDIR = ../../device/lib
6 LIBDIR = gen/$(PORT)/lib
8 LIBSDCCFLAGS+=--stack-auto --int-long-reent --float-reent
9 SDCCFLAGS +=$(LIBSDCCFLAGS) --nostdlib -L$(LIBDIR) -llibsdcc -llibint -lliblong -llibfloat
12 $(PORTS_DIR)/$(PORT)/%.c: $(PORTS_DIR)/mcs51/%.c
15 include $(PORTS_DIR)/mcs51/spec.mk
17 SOURCES = _atoi.c _atol.c _autobaud.c _bp.c _schar2fs.c \
18 _decdptr.c _divsint.c _divslong.c _divuint.c \
19 _divulong.c _fs2schar.c _fs2sint.c _fs2slong.c \
20 _fs2uchar.c _fs2uint.c _fs2ulong.c _fsadd.c \
21 _fsdiv.c _fseq.c _fsgt.c _fslt.c _fsmul.c \
22 _fsneq.c _fssub.c _gptrget.c _gptrput.c \
23 _sint2fs.c _iscntrl.c _isdigit.c _isgraph.c \
24 _islower.c _isprint.c _ispunct.c _isspace.c \
25 _isupper.c _isxdigit.c _slong2fs.c _memcmp.c \
26 _memcpy.c _memset.c _modsint.c _modslong.c \
27 _moduint.c _modulong.c _mulint.c _mullong.c \
29 _spx.c _startup.c _strchr.c _strcmp.c _strcpy.c \
30 _strcspn.c _strlen.c _strncat.c _strncmp.c \
31 _strncpy.c _strpbrk.c _strrchr.c _strspn.c \
32 _strstr.c _strtok.c _uchar2fs.c _uint2fs.c \
33 _ulong2fs.c malloc.c serial.c ser_ir.c printfl.c \
34 printf_large.c vprintf.c puts.c gets.c \
35 assert.c _strcat.c time.c printf_fast.c bpx.c
37 OBJECTS = $(patsubst %.c,$(LIBDIR)/%.rel,$(SOURCES))
39 make-library: $(LIBDIR) $(OBJECTS) lib-files
45 $(LIBDIR)/%.rel: $(LIBSRCDIR)/%.c
46 -$(SDCC) -I../../device/include $(LIBSDCCFLAGS) -c $< -o $@
49 cp $(LIBSRCDIR)/*.lib $(LIBDIR)