struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / lib / r800 / Makefile.in
blobfb0e9bd63db91cfeeba043533fb3a01fd407c28b
1 # libc/z80 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 = -mr800 --max-allocs-per-node 25000
11 SAS = $(top_builddir)/bin/sdasz80
13 # override PORTDIR defined by super (parent) makefile
14 override PORTDIR = ../build/r800
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 Z80_FLOAT = $(COMMON_FLOAT)
26 Z80_INT = $(COMMON_INT)
28 Z80_LONG = $(COMMON_LONG) \
29 _divulong.c \
30 _mullong.c
32 Z80_LONGLONG = $(COMMON_LONGLONG) \
33 _mullonglong.c \
34 _divslonglong.c \
35 _divulonglong.c \
36 _modslonglong.c \
37 _modulonglong.c
39 Z80_SDCC = $(COMMON_SDCC) \
40 _startup.c \
41 div.c \
42 ldiv.c \
43 lldiv.c \
44 sprintf.c \
45 vprintf.c \
46 strnlen.c \
47 _strcmp.c \
48 atomic_flag_clear.c
50 Z80SOURCES = $(addprefix ../,$(Z80_FLOAT) $(Z80_INT) $(Z80_LONG) $(Z80_LONGLONG) $(Z80_SDCC))
51 Z8OBJECTS = $(patsubst %.c,%.rel,$(Z80_FLOAT) $(Z80_INT) $(Z80_LONG) $(Z80_LONGLONG) $(Z80_SDCC))
53 OBJ = divunsigned.rel divsigned.rel divmixed.rel modunsigned.rel modsigned.rel modmixed.rel mul.rel mulchar.rel \
54 heap.rel memmove.rel strcpy.rel strlen.rel abs.rel __sdcc_call_hl.rel __sdcc_call_iy.rel crtenter.rel \
55 setjmp.rel atomic_flag_test_and_set.rel memcpy.rel __uitobcd.rel __ultobcd.rel __itoa.rel __ltoa.rel \
56 __strreverse.rel __sdcc_bcall.rel __sdcc_critical.rel __mulsint2slong.rel
58 LIB = r800.lib
59 AS = $(SAS)
60 ASFLAGS = -plosgff
62 CFLAGS = -I$(srcdir)/../../include -I. --std-c23
64 all: $(PORTDIR)/$(LIB) $(PORTDIR)/crt0.rel
66 $(PORTDIR)/crt0.rel: crt0.rel
67 cp crt0.rel $(PORTDIR)/crt0.rel
69 Makefile: $(srcdir)/Makefile.in
70 cd $(top_builddir); ./config.status device/lib/r800/Makefile
72 $(PORTDIR)/$(LIB): $(OBJ) $(Z8OBJECTS) Makefile
73 rm -f $@
74 ifeq ($(LIB_TYPE), SDCCLIB)
75 $(top_builddir)/bin/sdcclib -a $@ $(OBJ) $(Z8OBJECTS)
76 else
77 ifeq ($(LIB_TYPE), AR)
78 $(SDAR) -rcSD $@ $(OBJ) $(Z8OBJECTS)
79 else
80 ifeq ($(LIB_TYPE), RANLIB)
81 $(SDAR) -rcD $@ $(OBJ) $(Z8OBJECTS)
82 else
83 for i in $(basename $(OBJ) $(Z8OBJECTS)); do echo $$i >>$@; done
84 cp $(OBJ) $(Z8OBJECTS) $(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