
CPP = g++ -Wall
CPPFLAGS = -g
LIBS = -lm
FIZMODIR = ../fizmo
CPPDIR = ../cpp


fizmo: ScreenInterface.o SimpleInterface.o Interpreter.o $(FIZMODIR)/libfizmo.a
	$(CPP) $(CFLAGS) -L$(FIZMODIR) ScreenInterface.o SimpleInterface.o Interpreter.o -lfizmo $(LIBS) -lm -o fizmo

../fizmo/libfizmo.a::
	cd ../fizmo ; make libfizmo.a DISABLE_LIBXML2=1 

ScreenInterface.o: $(CPPDIR)/ScreenInterface.h
	$(CPP) $(CFLAGS) -c $(CPPDIR)/ScreenInterface.cpp

SimpleInterface.o: SimpleInterface.cpp SimpleInterface.h
	$(CPP) $(CFLAGS) -c SimpleInterface.cpp

Interpreter.o: $(CPPDIR)/Interpreter.cpp
	$(CPP) $(CFLAGS) -c $(CPPDIR)/Interpreter.cpp

clean:
	rm -f *.o
	cd ../fizmo ; make clean

