Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / lib / mos6502-stack-auto / Makefile.in
blobd49056cef833192406c78bfa4af909baa6faab78
1 # libc/mos6502 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 = -mmos6502 --stack-auto --max-allocs-per-node 25000 --opt-code-speed
11 SAS = $(top_builddir)/bin/sdas6500
13 # override PORTDIR defined by super (parent) makefile
14 override PORTDIR = ../build/mos6502-stack-auto
16 include $(srcdir)/../incl.mk
18 MOS6502_FLOAT = $(COMMON_FLOAT)
20 MOS6502_INT = $(COMMON_INT) \
21 _muluchar.c \
22 _mulschar.c \
23 _mulint.c \
24 _divuchar.c \
25 _divschar.c \
26 _divuint.c \
27 _divsint.c \
28 _moduchar.c \
29 _modschar.c \
30 _moduint.c \
31 _modsint.c
33 MOS6502_LONG = $(COMMON_LONG) \
34 _divulong.c \
35 _mullong.c
37 MOS6502_LONGLONG = $(COMMON_LONGLONG) \
38 _srulonglong.c \
39 _srslonglong.c \
40 _slulonglong.c \
41 _slslonglong.c \
42 _mullonglong.c \
43 _divslonglong.c \
44 _divulonglong.c \
45 _modslonglong.c \
46 _modulonglong.c
48 MOS6502_SDCC = $(COMMON_SDCC) \
49 __itoa.c \
50 __ltoa.c \
51 __memcpy.c \
52 _heap.c \
53 _memmove.c \
54 _spx.c \
55 _startup.c \
56 _strcmp.c \
57 _strcpy.c \
58 strlen.c \
59 strnlen.c \
60 div.c \
61 ldiv.c \
62 memcpy.c \
63 sprintf.c \
64 vprintf.c \
65 atomic_flag_clear.c
67 MOS6502SOURCES = $(addprefix ../,$(MOS6502_FLOAT) $(MOS6502_INT) $(MOS6502_LONG) $(MOS6502_LONGLONG) $(MOS6502_SDCC))
68 MOS6502OBJECTS = $(patsubst %.c,%.rel,$(MOS6502_FLOAT) $(MOS6502_INT) $(MOS6502_LONG) $(MOS6502_LONGLONG) $(MOS6502_SDCC))
70 OBJ = _dptr.rel _temp.rel _ret01.rel _ret23.rel _ret4567.rel _setjmp.rel atomic_flag_test_and_set.rel __sdcc_indirect_jsr.rel
72 LIB = mos6502.lib
73 AS = $(SAS)
74 ASFLAGS = -plosgff
76 CFLAGS = -I$(srcdir)/../../include -I. --std-c23
78 all: $(PORTDIR)/$(LIB) $(PORTDIR)/crt0.rel
80 $(PORTDIR)/crt0.rel: crt0.rel
81 cp crt0.rel $(PORTDIR)/crt0.rel
83 $(PORTDIR)/$(LIB): $(OBJ) $(MOS6502OBJECTS) Makefile
84 ifeq ($(LIB_TYPE), SDCCLIB)
85 rm -f $@; \
86 $(top_builddir)/bin/sdcclib -a $@ $(OBJ) $(MOS6502OBJECTS)
87 else
88 ifeq ($(LIB_TYPE), AR)
89 $(SDAR) -rcSD $@ $(OBJ) $(MOS6502OBJECTS)
90 else
91 ifeq ($(LIB_TYPE), RANLIB)
92 $(SDAR) -rcD $@ $(OBJ) $(MOS6502OBJECTS)
93 else
94 rm -f $@
95 for i in $(basename $(OBJ) $(MOS6502OBJECTS)); do echo $$i >>$@; done
96 cp $(OBJ) $(MOS6502OBJECTS) $(PORTDIR)
97 endif
98 endif
99 endif
101 %.rel: %.s
102 @# TODO: sdas should place it\'s output in the current dir
103 test $(srcdir) = . || cp $< .
104 -$(AS) $(ASFLAGS) $(notdir $<)
105 test $(srcdir) = . || rm $(notdir $<)
107 clean:
108 rm -f *.rel *.sym *.lst *~ $(CLEANSPEC) *.dump* *.asm *.lib
110 distclean: clean
111 rm -f Makefile
113 Makefile: $(srcdir)/Makefile.in
114 cd $(top_builddir); ./config.status device/lib/mos6502-stack-auto/Makefile