struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / lib / mos6502 / Makefile.in
blob5734a71f70dcba87ae094abf8f1368b4a069b779
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 --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
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 MOS6502_FLOAT = $(COMMON_FLOAT)
26 MOS6502_INT = $(COMMON_INT) \
27 _muluchar.c \
28 _mulschar.c \
29 _mulint.c \
30 _divuchar.c \
31 _divschar.c \
32 _divuint.c \
33 _divsint.c \
34 _moduchar.c \
35 _modschar.c \
36 _moduint.c \
37 _modsint.c
39 MOS6502_LONG = $(COMMON_LONG) \
40 _divulong.c \
41 _mullong.c
43 MOS6502_LONGLONG = $(COMMON_LONGLONG) \
44 _srulonglong.c \
45 _srslonglong.c \
46 _slulonglong.c \
47 _slslonglong.c \
48 _mullonglong.c \
49 _divslonglong.c \
50 _divulonglong.c \
51 _modslonglong.c \
52 _modulonglong.c
54 MOS6502_SDCC = $(COMMON_SDCC) \
55 __itoa.c \
56 __ltoa.c \
57 _heap.c \
58 _memmove.c \
59 _startup.c \
60 _strcmp.c \
61 _strcpy.c \
62 strlen.c \
63 strnlen.c \
64 memcpy.c \
65 div.c \
66 ldiv.c \
67 sprintf.c \
68 vprintf.c \
69 atomic_flag_clear.c
71 MOS6502SOURCES = $(addprefix ../,$(MOS6502_FLOAT) $(MOS6502_INT) $(MOS6502_LONG) $(MOS6502_LONGLONG) $(MOS6502_SDCC))
72 MOS6502OBJECTS = $(patsubst %.c,%.rel,$(MOS6502_FLOAT) $(MOS6502_INT) $(MOS6502_LONG) $(MOS6502_LONGLONG) $(MOS6502_SDCC))
74 OBJ = _dptr.rel _temp.rel _ret01.rel _ret23.rel _ret4567.rel _setjmp.rel atomic_flag_test_and_set.rel __sdcc_indirect_jsr.rel
76 LIB = mos6502.lib
77 AS = $(SAS)
78 ASFLAGS = -plosgff
80 CFLAGS = -I$(srcdir)/../../include -I. --std-c23
82 all: $(PORTDIR)/$(LIB) $(PORTDIR)/crt0.rel
84 $(PORTDIR)/crt0.rel: crt0.rel
85 cp crt0.rel $(PORTDIR)/crt0.rel
87 $(PORTDIR)/$(LIB): $(OBJ) $(MOS6502OBJECTS) Makefile
88 ifeq ($(LIB_TYPE), SDCCLIB)
89 rm -f $@; \
90 $(top_builddir)/bin/sdcclib -a $@ $(OBJ) $(MOS6502OBJECTS)
91 else
92 ifeq ($(LIB_TYPE), AR)
93 $(SDAR) -rcSD $@ $(OBJ) $(MOS6502OBJECTS)
94 else
95 ifeq ($(LIB_TYPE), RANLIB)
96 $(SDAR) -rcD $@ $(OBJ) $(MOS6502OBJECTS)
97 else
98 rm -f $@
99 for i in $(basename $(OBJ) $(MOS6502OBJECTS)); do echo $$i >>$@; done
100 cp $(OBJ) $(MOS6502OBJECTS) $(PORTDIR)
101 endif
102 endif
103 endif
105 clean:
106 rm -f *.rel *.sym *.lst *~ $(CLEANSPEC) *.dump* *.asm *.lib
108 distclean: clean
109 rm -f Makefile
111 Makefile: $(srcdir)/Makefile.in
112 cd $(top_builddir); ./config.status device/lib/mos6502/Makefile