struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / lib / s08 / Makefile.in
blob54720ce13bb382a639e10931153c28d8f086539a
1 # libc/s08 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 = -ms08 --max-allocs-per-node 25000
11 SAS = $(top_builddir)/bin/sdas6808
13 # override PORTDIR defined by super (parent) makefile
14 override PORTDIR = ../build/s08
16 include $(srcdir)/../incl.mk
18 HC08_FLOAT = $(COMMON_FLOAT)
20 HC08_INT = $(COMMON_INT) \
21 _mulint.c \
22 _divsint.c \
23 _divuint.c \
24 _modsint.c \
25 _moduint.c
27 HC08_LONG = $(COMMON_LONG) \
28 _mullong.c \
29 _divulong.c
31 HC08_LONGLONG = $(COMMON_LONGLONG) \
32 _srulonglong.c \
33 _srslonglong.c \
34 _slulonglong.c \
35 _slslonglong.c \
36 _mullonglong.c \
37 _divslonglong.c \
38 _divulonglong.c \
39 _modslonglong.c \
40 _modulonglong.c
42 HC08_SDCC = $(COMMON_SDCC) \
43 __itoa.c \
44 __ltoa.c \
45 _spx.c \
46 _startup.c \
47 strlen.c \
48 strnlen.c \
49 _strcmp.c \
50 _strcpy.c \
51 __memcpy.c \
52 div.c \
53 ldiv.c \
54 memcpy.c \
55 _memmove.c \
56 _heap.c \
57 sprintf.c \
58 vprintf.c \
59 atomic_flag_clear.c
61 HC08SOURCES = $(addprefix ../,$(HC08_FLOAT) $(HC08_INT) $(HC08_LONG) $(HC08_LONGLONG) $(HC08_SDCC))
62 HC08OBJECTS = $(patsubst %.c,%.rel,$(HC08_FLOAT) $(HC08_INT) $(HC08_LONG) $(HC08_LONGLONG) $(HC08_SDCC))
64 OBJ = _ret.rel _setjmp.rel atomic_flag_test_and_set.rel
66 LIB = s08.lib
67 AS = $(SAS)
68 ASFLAGS = -plosgff
70 CFLAGS = -I$(srcdir)/../../include -I. --std-c23
72 all: $(PORTDIR)/$(LIB)
74 $(PORTDIR)/$(LIB): $(OBJ) $(HC08OBJECTS) Makefile
75 rm -f $@
76 ifeq ($(LIB_TYPE), SDCCLIB)
77 $(top_builddir)/bin/sdcclib -a $@ $(OBJ) $(HC08OBJECTS)
78 else
79 ifeq ($(LIB_TYPE), AR)
80 $(SDAR) -rcSD $@ $(OBJ) $(HC08OBJECTS)
81 else
82 ifeq ($(LIB_TYPE), RANLIB)
83 $(SDAR) -rcD $@ $(OBJ) $(HC08OBJECTS)
84 else
85 for i in $(basename $(OBJ) $(HC08OBJECTS)); do echo $$i >>$@; done
86 cp $(OBJ) $(HC08OBJECTS) $(PORTDIR)
87 endif
88 endif
89 endif
91 clean:
92 rm -f *.rel *.sym *.lst *~ $(CLEANSPEC) *.dump* *.asm *.lib
94 distclean: clean
95 rm -f Makefile
97 Makefile: $(srcdir)/Makefile.in
98 cd $(top_builddir); ./config.status device/lib/s08/Makefile