struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / lib / pdk15-stack-auto / Makefile.in
blob55963553370889986f2900e3dbabdee26430b6f9
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 --stack-auto --max-allocs-per-node 25000
11 SAS = $(top_builddir)/bin/sdaspdk15
13 # override PORTDIR defined by super (parent) makefile
14 override PORTDIR = ../build/pdk15-stack-auto
16 include $(srcdir)/../incl.mk
18 PDK15_FLOAT = $(COMMON_FLOAT)
20 PDK15_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 PDK15_LONG = $(COMMON_LONG) \
34 _divulong.c \
35 _mullong.c
37 PDK15_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 PDK15_SDCC = $(COMMON_SDCC) \
49 __itoa.c \
50 _startup.c \
51 _strcmp.c \
52 _strcpy.c \
53 strlen.c \
54 strnlen.c \
55 _memmove.c \
56 __memcpy.c \
57 memcpy.c \
58 div.c \
59 ldiv.c \
60 lldiv.c \
61 sprintf.c \
62 vprintf.c
64 PDK15SOURCES = $(addprefix ../,$(PDK15_FLOAT) $(PDK15_INT) $(PDK15_LONG) $(PDK15_LONGLONG) $(PDK15_SDCC))
65 PDK15OBJECTS = $(patsubst %.c,%.rel,$(PDK15_FLOAT) $(PDK15_INT) $(PDK15_LONG) $(PDK15_LONGLONG) $(PDK15_SDCC))
67 OBJ = __gptrget.rel __gptrget2.rel heap.rel __setjmp.rel
69 LIB = pdk15.lib
70 AS = $(SAS)
71 ASFLAGS = -plosgff
73 CFLAGS = -I$(srcdir)/../../include -I. --std-c23
75 all: $(PORTDIR)/$(LIB)
77 $(PORTDIR)/$(LIB): $(OBJ) $(PDK15OBJECTS) Makefile
78 ifeq ($(LIB_TYPE), SDCCLIB)
79 rm -f $@; \
80 $(top_builddir)/bin/sdcclib -a $@ $(OBJ) $(PDK15OBJECTS)
81 else
82 ifeq ($(LIB_TYPE), AR)
83 $(SDAR) -rcSD $@ $(OBJ) $(PDK15OBJECTS)
84 else
85 ifeq ($(LIB_TYPE), RANLIB)
86 $(SDAR) -rcD $@ $(OBJ) $(PDK15OBJECTS)
87 else
88 rm -f $@
89 for i in $(basename $(OBJ) $(PDK15OBJECTS)); do echo $$i >>$@; done
90 cp $(OBJ) $(PDK15OBJECTS) $(PORTDIR)
91 endif
92 endif
93 endif
95 %.rel: %.c
96 $(CC) $(CFLAGS) ${EXTRA_CFLAGS} -c $<
98 %.rel: %.s
99 @# TODO: sdas should place it\'s output in the current dir
100 test $(srcdir) = . || cp $< .
101 -$(AS) $(ASFLAGS) $(notdir $<)
102 test $(srcdir) = . || rm $(notdir $<)
104 %.rel: ../%.c
105 $(CC) $(CFLAGS) ${EXTRA_CFLAGS} -c $<
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/pdk15-stack-auto/Makefile