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