FILES=src/MainScreen.o OUTNAME=cards HGMODS=Mercury2/modules/ NEEDED_MODULES=$(HGMODS)TextNode.so $(HGMODS)Cu2.so $(HGMODS)BillboardNode.so $(HGMODS)TextPlate.so HG_CORE=Mercury2/mercury.so CFLAGS=-IMercury2/src -DHAVE_CONFIG -DHGENGINE -IMercury2/modules -IMercury2/ -O2 -g CXXFLAGS=$(CFLAGS) all : $(OUTNAME) (cd modules&&$(MAKE)&&cd ..) $(OUTNAME) : $(FILES) $(NEEDED_MODULES) $(HG_CORE) g++ -o $@ $^ %.o : %.cpp $(HG_CORE) g++ $(CFLAGS) -c $< -o $@ $(NEEDED_MODULES) : $(HG_CORE) (cd Mercury2&&$(MAKE) modules&&cd ..) $(HG_CORE): makeMercury .PHONY : makeMercury makeMercury : Mercury2/Makefile (cd Mercury2&&$(MAKE)&&cd ..) Mercury2/Makefile : (cd Mercury2&&./cnconfigure&&cd ..) clean : rm -rf *~ *.o src/*.o src/*~ (cd modules&&$(MAKE) clean&&cd ..) clobber : Mercury2/Makefile rm -rf *~ *.o $(OUTNAME) src/*.o src/*~ (cd Mercury2&&$(MAKE) clean&&cd ..) rm -rf Mercury2/configuration.h rm -rf Mercury2/Makefile