5 top_builddir
= @top_builddir@
6 abs_top_builddir
= @abs_top_builddir@
10 EXTRA_CFLAGS
= -msm83
--max-allocs-per-node
25000
11 SAS
= $(top_builddir
)/bin
/sdasgb
13 # override PORTDIR defined by super (parent) makefile
14 override PORTDIR
= ..
/build
/sm83
17 @
# TODO: sdas should place it\'s output in the current dir
18 test $(srcdir) = . || cp
$< .
19 -$(AS
) $(ASFLAGS
) $(notdir $<)
20 test $(srcdir) = . ||
rm $(notdir $<)
22 include $(srcdir)/..
/incl.mk
24 Z80_FLOAT
= $(COMMON_FLOAT
)
26 Z80_INT
= $(COMMON_INT
)
28 Z80_LONG
= $(COMMON_LONG
) \
32 Z80_LONGLONG
= $(COMMON_LONGLONG
) \
39 Z80_SDCC
= $(COMMON_SDCC
) \
54 Z80SOURCES
= $(addprefix ..
/,$(Z80_FLOAT
) $(Z80_INT
) $(Z80_LONG
) $(Z80_LONGLONG
) $(Z80_SDCC
))
55 Z8OBJECTS
= $(patsubst %.c
,%.rel
,$(Z80_FLOAT
) $(Z80_INT
) $(Z80_LONG
) $(Z80_LONGLONG
) $(Z80_SDCC
))
57 OBJ
= divint.rel mul.rel memcpy.rel abs.rel \
58 __initrleblock.rel heap.rel __sdcc_call_hl.rel \
59 setjmp.rel atomic_flag_test_and_set.rel strlen.rel
65 CFLAGS
= -I
$(srcdir)/..
/..
/include -I.
--std-c23
67 all: $(PORTDIR
)/$(LIB
) $(PORTDIR
)/crt0.rel
69 $(PORTDIR
)/crt0.rel
: crt0.rel
70 cp crt0.rel
$(PORTDIR
)/crt0.rel
72 Makefile
: $(srcdir)/Makefile.in
73 cd
$(top_builddir
); .
/config.status device
/lib
/sm83
/Makefile
75 $(PORTDIR
)/$(LIB
): $(OBJ
) $(Z8OBJECTS
) Makefile
77 ifeq ($(LIB_TYPE
), SDCCLIB
)
78 $(top_builddir
)/bin
/sdcclib
-a
$@
$(OBJ
) $(Z8OBJECTS
)
80 ifeq ($(LIB_TYPE
), AR
)
81 $(SDAR
) -rcSD
$@
$(OBJ
) $(Z8OBJECTS
)
83 ifeq ($(LIB_TYPE
), RANLIB
)
84 $(SDAR
) -rcD
$@
$(OBJ
) $(Z8OBJECTS
)
86 for i in
$(basename $(OBJ
) $(Z8OBJECTS
)); do echo
$$i >>$@
; done
87 cp
$(OBJ
) $(Z8OBJECTS
) $(PORTDIR
)
93 rm -f
*.rel
*.sym
*.lst
*~
$(CLEANSPEC
) *.dump
* *.asm
*.lib
98 Makefile
: $(srcdir)/Makefile.in
99 cd
$(top_builddir
); .
/config.status device
/lib
/sm83
/Makefile