LIBNAME = ../Propeller.a

OBJECTS = propeller.o
SOURCES = $(OBJECTS:.o=.c)

all:	$(OBJECTS) $(LIBNAME) Makefile

$(LIBNAME):
	$(AR) $(OBJECTS)

LIBINCS=-I../../include

# The compiler/linker
CC=$(TOOLPATH)zpu-elf-gcc
AR=$(TOOLPATH)zpu-elf-ar -r $(LIBNAME)

# Compiler flags. Compile only, debug info, all warnings, optimize for size
CFLAGS=-c -g -Wall -Os -I/usr/include $(LIBINCS)

.c.o:
	$(CC) $(CFLAGS) $< -o $@

clean: FORCE
	rm -f *.o $(LIBNAME)
FORCE:
