6 top_srcdir
= @top_srcdir@
7 top_builddir
= @top_builddir@
10 SAS
= $(top_builddir
)/bin
/sdas8051
11 SCC
= $(top_builddir
)/bin
/sdcc
12 SDAR
= $(top_builddir
)/bin
/sdar
14 # override PORTDIR defined by super (parent) makefile
15 override PORTDIR
= ..
/build
/$(PORT
)
17 OBJ
= crtstart.rel crtxinit.rel crtxclear.rel crtclear.rel \
18 crtpagesfr.rel crtbank.rel crtcall.rel \
19 crtxstack.rel crtxpush.rel crtxpushr0.rel crtxpop.rel crtxpopr0.rel \
21 atomic_flag_test_and_set.rel atomic_flag_clear.rel __sdcc_atomic_maybe_rollback.rel
29 CFLAGS
= -I
$(top_srcdir
)/device
/include --std-c23
31 all: $(PORTDIR
)/$(LIB
)
33 $(PORTDIR
)/$(LIB
): $(OBJ
) Makefile
34 ifeq ($(LIB_TYPE
), SDCCLIB
)
36 $(top_builddir
)/bin
/sdcclib
-a
$@
$(OBJ
)
38 ifeq ($(LIB_TYPE
), AR
)
39 $(SDAR
) -rcSD
$@
$(OBJ
)
41 ifeq ($(LIB_TYPE
), RANLIB
)
42 $(SDAR
) -rcD
$@
$(OBJ
)
45 for i in
$(basename $(OBJ
)); do echo
$$i >>$@
; done
55 @
# TODO: asx8051 should place it\'s output in the current dir
56 test $(srcdir) = . || cp
$< .
57 -$(AS
) $(ASFLAGS
) $(notdir $<)
58 test $(srcdir) = . ||
rm $(notdir $<)
61 rm -f
*.rel
*.sym
*.lst
*~
$(CLEANSPEC
) *.dump
* *.lib
66 Makefile
: $(srcdir)/Makefile.in
67 cd
$(top_builddir
); .
/config.status device
/lib
/mcs51
/Makefile