struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / lib / pdk15 / Makefile.in
blob454e66ef2c6f552b04a2f6921233f3d4fd509547
1 # libc/pdk15 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 = -mpdk15 --max-allocs-per-node 25000
11 SAS = $(top_builddir)/bin/sdaspdk15
13 # override PORTDIR defined by super (parent) makefile
14 override PORTDIR = ../build/pdk15
16 include $(srcdir)/../incl.mk
18 PDK15_FLOAT = $(COMMON_FLOAT)
20 PDK15_INT = $(COMMON_INT) \
21 _mulschar.c \
22 _mulint.c \
23 _divuchar.c \
24 _divschar.c \
25 _divuint.c \
26 _divsint.c \
27 _moduchar.c \
28 _modschar.c \
29 _moduint.c \
30 _modsint.c
32 PDK15_LONG = $(COMMON_LONG) \
33 _divulong.c \
34 _mullong.c
36 PDK15_LONGLONG = $(COMMON_LONGLONG) \
37 _srulonglong.c \
38 _srslonglong.c \
39 _slulonglong.c \
40 _slslonglong.c \
41 _mullonglong.c \
42 _divslonglong.c \
43 _divulonglong.c \
44 _modslonglong.c \
45 _modulonglong.c
47 PDK15_SDCC = $(COMMON_SDCC) \
48 __itoa.c \
49 _startup.c \
50 _strcmp.c \
51 _strcpy.c \
52 strlen.c \
53 strnlen.c \
54 _memmove.c \
55 __memcpy.c \
56 memcpy.c \
57 div.c \
58 ldiv.c \
59 lldiv.c \
60 sprintf.c \
61 vprintf.c
63 PDK15SOURCES = $(addprefix ../,$(PDK15_FLOAT) $(PDK15_INT) $(PDK15_LONG) $(PDK15_LONGLONG) $(PDK15_SDCC))
64 PDK15OBJECTS = $(patsubst %.c,%.rel,$(PDK15_FLOAT) $(PDK15_INT) $(PDK15_LONG) $(PDK15_LONGLONG) $(PDK15_SDCC))
66 OBJ = __gptrget.rel __gptrget2.rel heap.rel __setjmp.rel _muluchar.rel
68 LIB = pdk15.lib
69 AS = $(SAS)
70 ASFLAGS = -plosgff
72 CFLAGS = -I$(srcdir)/../../include -I. --std-c23
74 all: $(PORTDIR)/$(LIB)
76 $(PORTDIR)/$(LIB): $(OBJ) $(PDK15OBJECTS) Makefile
77 ifeq ($(LIB_TYPE), SDCCLIB)
78 rm -f $@; \
79 $(top_builddir)/bin/sdcclib -a $@ $(OBJ) $(PDK15OBJECTS)
80 else
81 ifeq ($(LIB_TYPE), AR)
82 $(SDAR) -rcSD $@ $(OBJ) $(PDK15OBJECTS)
83 else
84 ifeq ($(LIB_TYPE), RANLIB)
85 $(SDAR) -rcD $@ $(OBJ) $(PDK15OBJECTS)
86 else
87 rm -f $@
88 for i in $(basename $(OBJ) $(PDK15OBJECTS)); do echo $$i >>$@; done
89 cp $(OBJ) $(PDK15OBJECTS) $(PORTDIR)
90 endif
91 endif
92 endif
94 %.rel: %.s
95 @# TODO: sdas should place it\'s output in the current dir
96 test $(srcdir) = . || cp $< .
97 -$(AS) $(ASFLAGS) $(notdir $<)
98 test $(srcdir) = . || rm $(notdir $<)
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/pdk15/Makefile