Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / lib / stm8-large / Makefile.in
blob8ce32964d43655a33908fe26f37c02846804735c
1 # libc/stm8-large Makefile
3 VPATH = @srcdir@
4 srcdir = @srcdir@
5 top_builddir = @top_builddir@
6 abs_top_builddir = @abs_top_builddir@
8 LIB_TYPE = @LIB_TYPE@
10 EXTRA_CFLAGS = -mstm8 --model-large --max-allocs-per-node 25000
11 SAS = $(top_builddir)/bin/sdasstm8
13 # override PORTDIR defined by super (parent) makefile
14 override PORTDIR = ../build/stm8-large
16 %.rel: %.s
17 @# TODO: sdas should place it\'s output in the current dir
18 test $(srcdir) = . || cp $< .
19 -$(AS) $(ASFLAGS) $(notdir $<)
20 test $(srcdir) = . || rm $(notdir $<)
22 include $(srcdir)/../incl.mk
24 STM8_FLOAT = $(COMMON_FLOAT)
26 STM8_INT = _mulschar.c _divschar.c _modschar.c
28 STM8_LONG =
30 STM8_LONGLONG = $(COMMON_LONGLONG) \
31 _srulonglong.c \
32 _srslonglong.c \
33 _slulonglong.c \
34 _slslonglong.c \
35 _mullonglong.c \
36 _divslonglong.c \
37 _divulonglong.c \
38 _modslonglong.c \
39 _modulonglong.c
41 STM8_SDCC = $(COMMON_SDCC) \
42 __itoa.c \
43 __ltoa.c \
44 _startup.c \
45 strlen.c \
46 strnlen.c \
47 _memmove.c \
48 div.c \
49 ldiv.c \
50 lldiv.c \
51 sprintf.c \
52 vprintf.c \
53 atomic_flag_clear.c
55 STM8SOURCES = $(addprefix ../,$(STM8_FLOAT) $(STM8_INT) $(STM8_LONG) $(STM8_LONGLONG) $(STM8_SDCC))
56 STM8OBJECTS = $(patsubst %.c,%.rel,$(STM8_FLOAT) $(STM8_INT) $(STM8_LONG) $(STM8_LONGLONG) $(STM8_SDCC))
58 OBJ = setjmp.rel _mulint.rel __mulsint2slong.rel __mululonguchar2ulonglong.rel _divsint.rel _modsint.rel _mullong.rel _divulong.rel _modulong.rel _divslong.rel _modslong.rel _fast_long_neg.rel heap.rel strcpy.rel strcmp.rel memcpy.rel atomic_flag_test_and_set.rel
60 LIB = stm8.lib
61 AS = $(SAS)
62 ASFLAGS = -plosgff
64 CFLAGS = -I$(srcdir)/../../include -I. --std-c23
66 all: $(PORTDIR)/$(LIB)
68 $(PORTDIR)/$(LIB): $(OBJ) $(STM8OBJECTS) Makefile
69 ifeq ($(LIB_TYPE), SDCCLIB)
70 rm -f $@; \
71 $(top_builddir)/bin/sdcclib -a $@ $(OBJ) $(STM8OBJECTS)
72 else
73 ifeq ($(LIB_TYPE), AR)
74 $(SDAR) -rcSD $@ $(OBJ) $(STM8OBJECTS)
75 else
76 ifeq ($(LIB_TYPE), RANLIB)
77 $(SDAR) -rcD $@ $(OBJ) $(STM8OBJECTS)
78 else
79 rm -f $@
80 for i in $(basename $(OBJ) $(STM8OBJECTS)); do echo $$i >>$@; done
81 cp $(OBJ) $(STM8OBJECTS) $(PORTDIR)
82 endif
83 endif
84 endif
86 clean:
87 rm -f *.rel *.sym *.lst *~ $(CLEANSPEC) *.dump* *.asm *.lib
89 distclean: clean
90 rm -f Makefile
92 Makefile: $(srcdir)/Makefile.in
93 cd $(top_builddir); ./config.status device/lib/stm8-large/Makefile