# -*- makefile -*-
#
# Main Makefile for building the Qt library, examples and tutorial.
# Read PORTING for instructions how to port Qt to a new platform.
#

CC	= gcc
CFLAGS	= -O2 -fno-strength-reduce -Wall -W
LFLAGS	= -lqt

all: library tutorial examples

library tutorial examples: moc FORCE
	cd $@; $(MAKE)

moc: variables FORCE
	cd $@; $(MAKE)
	[ -d bin ] || mkdir bin
	cp moc/moc bin/moc

clean:
	-rm variables
	cd moc; $(MAKE) clean
	cd library; $(MAKE) clean
	cd tutorial; $(MAKE) clean
	cd examples; $(MAKE) clean

depend:
	cd moc; $(MAKE) depend
	cd library; $(MAKE) depend
	cd tutorial; $(MAKE) depend
	cd examples; $(MAKE) depend

variables: Makefile
	CC="$(CC)" CFLAGS="$(CFLAGS)" LFLAGS="$(LFLAGS)" ./propagate
	touch variables

dep: depend

FORCE:


