struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / lib / pdk13 / Makefile.in
blobdf0fa6f680465e1c004e9513d2232864a3a88065
1 # libc/pdk13 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 = -mpdk13 --max-allocs-per-node 25000
11 SAS = $(top_builddir)/bin/sdaspdk13
13 # override PORTDIR defined by super (parent) makefile
14 override PORTDIR = ../build/pdk13
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 PDK13_FLOAT = $(COMMON_FLOAT)
26 PDK13_INT = $(COMMON_INT) \
27 _mulschar.c \
28 _mulint.c \
29 _divuchar.c \
30 _divschar.c \
31 _divuint.c \
32 _divsint.c \
33 _moduchar.c \
34 _modschar.c \
35 _moduint.c \
36 _modsint.c
38 PDK13_LONG = $(COMMON_LONG) \
39 _divulong.c \
40 _mullong.c
42 PDK13_LONGLONG = $(COMMON_LONGLONG) \
43 _srulonglong.c \
44 _srslonglong.c \
45 _slulonglong.c \
46 _slslonglong.c \
47 _mullonglong.c \
48 _divslonglong.c \
49 _divulonglong.c \
50 _modslonglong.c \
51 _modulonglong.c
53 PDK13_SDCC = $(COMMON_SDCC) \
54 __itoa.c \
55 _startup.c \
56 _strcmp.c \
57 _strcpy.c \
58 strlen.c \
59 strnlen.c \
60 _memmove.c \
61 __memcpy.c \
62 memcpy.c \
63 div.c \
64 ldiv.c \
65 lldiv.c \
66 sprintf.c \
67 vprintf.c
69 PDK13SOURCES = $(addprefix ../,$(PDK13_FLOAT) $(PDK13_INT) $(PDK13_LONG) $(PDK13_LONGLONG) $(PDK13_SDCC))
70 PDK13OBJECTS = $(patsubst %.c,%.rel,$(PDK13_FLOAT) $(PDK13_INT) $(PDK13_LONG) $(PDK13_LONGLONG) $(PDK13_SDCC))
72 OBJ = __gptrget.rel __gptrget2.rel heap.rel __setjmp.rel _muluchar.rel
74 LIB = pdk13.lib
75 AS = $(SAS)
76 ASFLAGS = -plosgff
78 CFLAGS = -I$(srcdir)/../../include -I. --std-c23
80 all: $(PORTDIR)/$(LIB)
82 $(PORTDIR)/$(LIB): $(OBJ) $(PDK13OBJECTS) Makefile
83 ifeq ($(LIB_TYPE), SDCCLIB)
84 rm -f $@; \
85 $(top_builddir)/bin/sdcclib -a $@ $(OBJ) $(PDK13OBJECTS)
86 else
87 ifeq ($(LIB_TYPE), AR)
88 $(SDAR) -rcSD $@ $(OBJ) $(PDK13OBJECTS)
89 else
90 ifeq ($(LIB_TYPE), RANLIB)
91 $(SDAR) -rcD $@ $(OBJ) $(PDK13OBJECTS)
92 else
93 rm -f $@
94 for i in $(basename $(OBJ) $(PDK13OBJECTS)); do echo $$i >>$@; done
95 cp $(OBJ) $(PDK13OBJECTS) $(PORTDIR)
96 endif
97 endif
98 endif
100 clean:
101 rm -f *.rel *.sym *.lst *~ $(CLEANSPEC) *.dump* *.asm *.lib
103 distclean: clean
104 rm -f Makefile
106 Makefile: $(srcdir)/Makefile.in
107 cd $(top_builddir); ./config.status device/lib/pdk13/Makefile