3 top_builddir = @top_builddir@
9 PORTDIR = ../build/ds390
13 OBJECTS = tinibios.rel memcpyx.rel lcd390.rel i2c390.rel rtc390.rel putchar.rel
15 SOURCES = $(patsubst %.rel,%.c,$(OBJECTS))
17 CPPFLAGS = -I$(srcdir)/../../include
18 CFLAGS = -mds390 $(CPPFLAGS) $(VERBOSE) --std-c99
20 all: $(OBJECTS) $(PORTDIR)/libds390.lib
23 rm -f *.lst *.rel *.sym *.cdb *.asm \#* *~ *.rst *.hex
24 rm -f *.ihx temp.lnk *.map *.lib
27 rm -f Makefile Makefile.dep
29 $(PORTDIR)/libds390.lib: $(OBJECTS)
30 ifeq ($(LIB_TYPE), SDCCLIB)
32 ../../../bin/sdcclib -a $@ $(OBJECTS)
33 else ifeq ($(LIB_TYPE), AR)
35 else ifeq ($(LIB_TYPE), RANLIB)
37 $(top_builddir)/bin/asranlib $@
40 for libfile in $(basename $(OBJECTS)); do echo $$libfile >>$@; done
41 cp $(OBJECTS) $(PORTDIR)
47 # Creating dependencies
48 # ---------------------
51 Makefile.dep: $(SOURCES)
54 $(CC) -M $(CPPFLAGS) $$i >$${i}.dep; \
55 cat $${i}.dep >>Makefile.dep; \
59 ifeq "$(findstring $(MAKECMDGOALS),clean distclean)" ""