4 top_srcdir = @top_srcdir@
5 top_builddir = @top_builddir@
8 SAS = $(top_builddir)/bin/asx8051
9 SCC = $(top_builddir)/bin/sdcc
11 # override PORTDIR defined by super (parent) makefile
12 override PORTDIR = ../build/$(PORT)
14 OBJ = crtstart.rel crtxinit.rel crtxclear.rel crtclear.rel crtxstack.rel \
15 crtpagesfr.rel crtbank.rel crtcall.rel
23 CFLAGS = -I$(top_srcdir)/include --std-c89
25 all: $(PORTDIR)/$(LIB)
27 $(PORTDIR)/$(LIB): $(OBJ) Makefile
28 ifeq ($(LIB_TYPE), SDCCLIB)
30 ../../../bin/sdcclib -a $@ $(OBJ)
31 else ifeq ($(LIB_TYPE), AR)
33 else ifeq ($(LIB_TYPE), RANLIB)
35 $(top_builddir)/bin/asranlib $@
38 for i in $(basename $(OBJ)); do echo $$i >>$@; done
46 @# TODO: asx8051 should place it's output in the current dir
47 test $(srcdir) = . || cp $< .
48 -$(AS) $(ASFLAGS) $(notdir $<)
49 test $(srcdir) = . || rm $(notdir $<)
52 rm -f *.rel *.sym *.lst *~ $(CLEANSPEC) *.dump* *.lib