FILE		= texture

SUBDIR		= src

UNAME		= $(shell uname)

ifeq ($(UNAME),Linux)
TARGET		= linux
PLATFORM	= unix
#SPEC		= /usr/local/qt/mkspecs/linux-g++
SPEC		= /usr/lib/qt-3.3/mkspecs/linux-g++
endif

ifeq ($(UNAME),Darwin)
TARGET		= darwin
PLATFORM	= macx
#SPEC		= /usr/local/qt/mkspecs/macx-g++
SPEC		= /sw/lib/qt3/mkspecs/macx-g++
endif

all:
# don't create a .pro file - this is hand-made to ensure cross-portability
#	cd $(SUBDIR); qmake -project -o $(FILE).pro
	cd $(SUBDIR); qmake -$(PLATFORM) -spec $(SPEC)
	cd $(SUBDIR); make
	@echo ""
	@echo "** Executable is in the $(SUBDIR)/ subdir"

clean:
	cd $(SUBDIR); make clean
	cd $(SUBDIR); rm -rf $(FILE).app
