5 top_builddir
= @top_builddir@
6 abs_top_builddir
= @abs_top_builddir@
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
) \
33 PDK15_LONG
= $(COMMON_LONG
) \
37 PDK15_LONGLONG
= $(COMMON_LONGLONG
) \
48 PDK15_SDCC
= $(COMMON_SDCC
) \
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
73 CFLAGS
= -I
$(srcdir)/..
/..
/include -I.
--std-c23
75 all: $(PORTDIR
)/$(LIB
)
77 $(PORTDIR
)/$(LIB
): $(OBJ
) $(PDK15OBJECTS
) Makefile
78 ifeq ($(LIB_TYPE
), SDCCLIB
)
80 $(top_builddir
)/bin
/sdcclib
-a
$@
$(OBJ
) $(PDK15OBJECTS
)
82 ifeq ($(LIB_TYPE
), AR
)
83 $(SDAR
) -rcSD
$@
$(OBJ
) $(PDK15OBJECTS
)
85 ifeq ($(LIB_TYPE
), RANLIB
)
86 $(SDAR
) -rcD
$@
$(OBJ
) $(PDK15OBJECTS
)
89 for i in
$(basename $(OBJ
) $(PDK15OBJECTS
)); do echo
$$i >>$@
; done
90 cp
$(OBJ
) $(PDK15OBJECTS
) $(PORTDIR
)
96 $(CC
) $(CFLAGS
) ${EXTRA_CFLAGS} -c
$<
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 $<)
105 $(CC
) $(CFLAGS
) ${EXTRA_CFLAGS} -c
$<
108 rm -f
*.rel
*.sym
*.lst
*~
$(CLEANSPEC
) *.dump
* *.asm
*.lib
113 Makefile
: $(srcdir)/Makefile.in
114 cd
$(top_builddir
); .
/config.status device
/lib
/pdk15-stack-auto
/Makefile