Announce SDCC 4.5.0 RC1.
[sdcc.git] / sdcc / device / lib / pdk14 / Makefile.in
blob26b9b788054d8f5b42dcb6cc781b82ef672c8d67
1 # libc/pdk14 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 = -mpdk14 --max-allocs-per-node 25000
11 SAS = $(top_builddir)/bin/sdaspdk14
13 # override PORTDIR defined by super (parent) makefile
14 override PORTDIR = ../build/pdk14
16 include $(srcdir)/../incl.mk
18 PDK14_FLOAT = $(COMMON_FLOAT)
20 PDK14_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 PDK14_LONG = $(COMMON_LONG) \
33 _divulong.c \
34 _mullong.c
36 PDK14_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 PDK14_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 PDK14SOURCES = $(addprefix ../,$(PDK14_FLOAT) $(PDK14_INT) $(PDK14_LONG) $(PDK14_LONGLONG) $(PDK14_SDCC))
64 PDK14OBJECTS = $(patsubst %.c,%.rel,$(PDK14_FLOAT) $(PDK14_INT) $(PDK14_LONG) $(PDK14_LONGLONG) $(PDK14_SDCC))
66 OBJ = __gptrget.rel __gptrget2.rel heap.rel __setjmp.rel _muluchar.rel
68 LIB = pdk14.lib
69 AS = $(SAS)
70 ASFLAGS = -plosgff
72 CFLAGS = -I$(srcdir)/../../include -I. --std-c23
74 all: $(PORTDIR)/$(LIB)
76 $(PORTDIR)/$(LIB): $(OBJ) $(PDK14OBJECTS) Makefile
77 ifeq ($(LIB_TYPE), SDCCLIB)
78 rm -f $@; \
79 $(top_builddir)/bin/sdcclib -a $@ $(OBJ) $(PDK14OBJECTS)
80 else
81 ifeq ($(LIB_TYPE), AR)
82 $(SDAR) -rcSD $@ $(OBJ) $(PDK14OBJECTS)
83 else
84 ifeq ($(LIB_TYPE), RANLIB)
85 $(SDAR) -rcD $@ $(OBJ) $(PDK14OBJECTS)
86 else
87 rm -f $@
88 for i in $(basename $(OBJ) $(PDK14OBJECTS)); do echo $$i >>$@; done
89 cp $(OBJ) $(PDK14OBJECTS) $(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/pdk14/Makefile