5 top_builddir
= @top_builddir@
6 abs_top_builddir
= @abs_top_builddir@
10 CC
= $(top_builddir
)/bin
/sdcc
11 SDAR
= $(abs_top_builddir
)/bin
/sdar
13 # override PORTDIR defined by super (parent) makefile
14 override PORTDIR
= ..
/build
/ds400
18 OBJECTS
= tinibios.rel memcpyx.rel ds400rom.rel
20 SOURCES
= $(patsubst %.rel
,%.c
,$(OBJECTS
))
22 CPPFLAGS
= -I
$(srcdir)/..
/..
/include -I
$(srcdir)/..
/..
/include/ds400
23 CFLAGS
= -mds400
$(CPPFLAGS
) $(VERBOSE
) --std-c23
25 all: $(OBJECTS
) $(PORTDIR
)/libds400.lib
28 rm -f
*.lst
*.rel
*.sym
*.cdb
*.asm \
#* *~ *.rst *.hex
29 rm -f
*.ihx temp.lnk
*.map
*.lib
32 rm -f Makefile Makefile.dep
34 $(PORTDIR
)/libds400.lib
: $(OBJECTS
)
35 ifeq ($(LIB_TYPE
), SDCCLIB
)
37 $(top_builddir
)/bin
/sdcclib
-a
$@
$(OBJECTS
)
39 ifeq ($(LIB_TYPE
), AR
)
40 $(SDAR
) -rcSD
$@
$(OBJECTS
)
42 ifeq ($(LIB_TYPE
), RANLIB
)
43 $(SDAR
) -rcD
$@
$(OBJECTS
)
46 for libfile in
$(basename $(OBJECTS
)); do echo
$$libfile >>$@
; done
47 cp
$(OBJECTS
) $(PORTDIR
)
55 # Creating dependencies
56 # ---------------------
59 Makefile.dep
: $(SOURCES
)
62 $(CC
) -M
$(CPPFLAGS
) $$i >$${i}.dep
; \
63 cat
$${i}.dep
>>Makefile.dep
; \
67 ifeq "$(findstring $(MAKECMDGOALS),clean distclean)" ""
71 Makefile
: $(srcdir)/Makefile.in
72 cd
$(top_builddir
); .
/config.status device
/lib
/ds400
/Makefile