CC = g++
CFLAGS = -g -Wall -std=c++11
HEADERS = Circle.h Shape.h Triangle.h Square.h
OBJS = Circle.o Shape.o Triangle.o Square.o

all: extra1 libex1.a

libex1.a: clean $(OBJS) $(HEADERS)
	ar rcs libex1.a $(OBJS)

extra1: clean extra1.o $(OBJS) $(HEADERS)
	$(CC) -o extra1 extra1.o $(OBJS) $(LDFLAGS)

%.o: %.cc $(HEADERS)
	$(CC) $(CFLAGS) -c $<

clean: FORCE
	/bin/rm -f *.o *~ extra1 libex1.a

FORCE: