# Generated automatically from Makefile.in by configure.
CC     = gcc
CFLAGS = -O6 -Wall -m486 -fstrength-reduce -ffast-math -fomit-frame-pointer -fforce-mem -fforce-addr -funroll-loops -I./src/include
LIBS   = -lm -laa -lpng -lz -lbsd
LFLAGS = -Zbin-files
#AR     = @AR@
RANLIB = ranlib


TLIBS= \
       src/lib/libui.a \
       src/lib/libengine.a \
       src/lib/libutil.a \
       src/lib/libfilter.a \
       src/lib/libuiaa.a \
       src/lib/libuivio.a 

DIRS= \
       filter \
       engine \
       ui \
       util \
       ui/ui-drv/aa ui/ui-drv/os2 

PROG= ./bin/xaos.exe
OBJS = $(SRCS:.c=.o)

TLIB = 


all default:	$(PROG)

./bin:
	mkdir bin

libs:
	$(MAKE) -C src/ui -f Makefile.os2 all
	$(MAKE) -C src/engine -f Makefile.os2 all
	$(MAKE) -C src/filter -f Makefile.os2 all
	$(MAKE) -C src/util -f Makefile.os2 all
	$(MAKE) -C src/ui\ui-drv\aa -f Makefile.os2 all
	$(MAKE) -C src/ui\ui-drv\os2 -f Makefile.os2 all


$(PROG): ./bin src/include/config.h src/include/aconfig.h libs
	$(CC) $(CFLAGS) $(LFLAGS) -o $@ $(TLIBS) $(LIBS)

src/include/config.h:
	cp src/include/config/config.os2 src/include/config.h

src/include/aconfig.h:
	cp src/include/config/aconfig.os2 src/include/aconfig.h

clean:
	$(MAKE) -C src/ui -f Makefile.os2 clean
	$(MAKE) -C src/engine -f Makefile.os2 clean
	$(MAKE) -C src/filter -f Makefile.os2 clean
	$(MAKE) -C src/util -f Makefile.os2 clean
	$(MAKE) -C src/ui\ui-drv\aa -f Makefile.os2 clean
	$(MAKE) -C src/ui\ui-drv\os2 -f Makefile.os2 clean
	rm -f src/include/config.h
	rm -f src/include/aconfig.h
	rm -f $(PROG)

distclean:	clean
	rm  -f Makefile

#dep:
#	rm -f .depend
#	make .depend
#
#.depend:
#	echo '# Program dependencies' >.depend
#	gcc -I svgalib $(DEFINES) -MM $(patsubst %.o,%.c,$(OBJS)) >>.depend
#
#include .depend
