# parts taken from the libopencm3 project

LIBARM  := ../..

.PHONY:	cleanlib

lib:	libarm.h libarm.a

include ../../var.mk
include ../../flg.mk

DEPINC   := -I. -I.. -I../..
CFLAGS   += $(DEPINC)
DEPFILES :=  ../../*.c *.c # ../*.c
HFILES  := $(filter-out libarm.h,$(sort $(wildcard ../../*.h ../*.h *.h)))

include arch.mk
include ../../tgt.mk

libarm.h:	$(HFILES)
	cat ../../libarm.sta $(HFILES) ../../libarm.end > libarm.h

cleanlib:	clean
	rm -f libarm.h libarm.a

-include depend.mk
