LIBRARY=../lib/gem++.olb
INC=../include

SRC=
MAINSRC=example.cc acc.cc
PROGS=example.prg acc.acc
OBJ=$(subst .cc,.o,$(SRC))
LDLIBS=-lgem -lg++
LDFLAGS=

GXXINC:=$(INC),$(GXXINC)

#C++FLAGS:=$(C++FLAGS) -O2 -W
C++FLAGS:=$(C++FLAGS) -Wall

#main:	example.prg

all:	$(PROGS)

acc.acc: acc.o $(OBJ) $(LIBRARY)
	$(LINK.o) $(LDFLAGS) $^ $(LDLIBS) -o $@

example.prg: example.o $(OBJ) $(LIBRARY)
	$(LINK.o) $(LDFLAGS) $^ $(LDLIBS) -o $@

$(PROGS):	$(OBJ)

clean:
	rm $(OBJ) $(subst .cc,.o,$(MAINSRC))

clobber: clean
	rm $(PROGS)

depend:
	-$(CC) -M $(SRC) $(MAINSRC) >/tmp/make.123
	sed 's/[a-z]:[^ ]*//g' \tmp\make.123 >depends
	rm /tmp/make.123

include depends
