# $Id$
+DESTDIR=
+prefix=/home/keithp/sat
+libdir=$(prefix)/lib
+includedir=$(prefix)/include
+
CC=arm-none-eabi-gcc
# This is where you chose which platform to compile for (see 'make links' / './platform')
BUILDFILES := $(shell find -L build -type f -name "*.c")
# All header files of the project
HDRFILES := $(shell find -L $(PROJDIRS) -type f -name "*.h")
+BUILDHDRFILES := $(shell find -L build -type f -name "*.h")
# All .c files in functions/_PDCLIB that do not have a regression test driver
INTFILES := _Exit atomax digits open print scan remove rename seed stdinit strtox_main strtox_prelim filemode eol errno seek prepread prepwrite allocpages tmpfilename closeall
# All object files in the library
@ar rc pdclib.a $?
@echo
+install: install-lib install-hdr
+
+install-lib: pdclib.a
+ install -D -c pdclib.a $(DESTDIR)$(libdir)/pdclib.a
+
+install-hdr: $(BUILDHDRFILES)
+ for file in $(BUILDHDRFILES); do \
+ install -D -c $$file $(DESTDIR)$(includedir)/.; \
+ done
+
test: functions/$(FILE)
functions/$(FILE)