* device/lib/logf.c: "fixed" overlay bug
[fw/sdcc] / support / regression / ports / mcs51-stack-auto / spec.mk
1 # Port specification for the mcs51 port running with uCsim
2 #
3 # model small stack-auto
4
5 LIBSRCDIR = ../../device/lib
6 LIBDIR    = gen/$(PORT)/lib
7
8 LIBSDCCFLAGS+=--stack-auto --int-long-reent --float-reent
9 SDCCFLAGS   +=$(LIBSDCCFLAGS) --nostdlib -L$(LIBDIR) -llibsdcc -llibint -lliblong -llibfloat
10
11 # copy support.c
12 $(PORTS_DIR)/$(PORT)/%.c: $(PORTS_DIR)/mcs51/%.c
13         cp $< $@
14
15 include $(PORTS_DIR)/mcs51/spec.mk
16
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           fabsf.c sqrtf.c logf.c log10f.c powf.c tanf.c \
23           errno.c frexpf.c ldexpf.c tancotf.c \
24           _fsneq.c _fssub.c _gptrget.c _gptrput.c \
25           _sint2fs.c _iscntrl.c _isdigit.c _isgraph.c \
26           _islower.c _isprint.c _ispunct.c _isspace.c \
27           _isupper.c _isxdigit.c _slong2fs.c _memcmp.c \
28           _memcpy.c _memset.c _modsint.c _modslong.c \
29           _moduint.c _modulong.c _mulint.c _mullong.c \
30           _ser.c _setjmp.c \
31           _spx.c _startup.c _strchr.c _strcmp.c _strcpy.c \
32           _strcspn.c _strlen.c _strncat.c _strncmp.c \
33           _strncpy.c _strpbrk.c _strrchr.c _strspn.c \
34           _strstr.c _strtok.c _uchar2fs.c _uint2fs.c \
35           _ulong2fs.c malloc.c serial.c ser_ir.c printfl.c \
36           printf_large.c vprintf.c puts.c gets.c \
37           assert.c _strcat.c time.c printf_fast.c bpx.c
38
39 OBJECTS = $(patsubst %.c,$(LIBDIR)/%.rel,$(SOURCES))
40 MODULES = $(patsubst %.c,%,$(SOURCES))
41
42 .PHONY: make-library
43 make-library: $(LIBDIR) $(OBJECTS) lib-files
44
45
46 $(LIBDIR):
47         mkdir -p $(LIBDIR)
48
49 $(LIBDIR)/%.rel: $(LIBSRCDIR)/%.c
50         -$(SDCC) -I../../device/include $(LIBSDCCFLAGS) -c $< -o $@
51
52 .PHONY: lib-files
53 lib-files:
54         echo $(MODULES) | tr ' ' '\n' > $(LIBDIR)/libsdcc.lib
55         touch $(LIBDIR)/libfloat.lib $(LIBDIR)/libint.lib $(LIBDIR)/liblong.lib