# $Id: Makefile,v 1.9 2001/02/19 17:51:07 philippe Exp $
#
# $Log: Makefile,v $
# Revision 1.9  2001/02/19 17:51:07  philippe
# Change in subdirs to compile.
#
# Revision 1.8  2000/11/07 19:51:46  pascal
# Added a lot of new projects
#
# Revision 1.7  2000/11/06 16:33:56  pascal
# Added demo2
#
# Revision 1.6  2000/10/19 07:22:22  pascal
# Create bin if needed
#
# Revision 1.5  2000/10/18 17:07:25  pascal
# Now waba compiles for x86 (using sdl), and for uClinux (not yet using PGUI)
#
# Revision 1.4  2000/10/18 15:24:58  pascal
# Solves the PIC32 gcc compiler problem (needs _cleanup)
#
# Revision 1.3  2000/08/01 10:16:56  pascal
# *** empty log message ***
#
# Revision 1.2  2000/07/12 18:26:02  pascal
# Added target: install_src
#
# Revision 1.1  2000/07/11 19:28:45  pascal
# Initial revision
#

# Set up you environment here

TARGET_ROOT = @target_root@
CROSS = m68k-pic-coff-

CC =     $(CROSS)gcc
AR =     $(CROSS)ar
LD =     $(CROSS)ld
NM =     $(CROSS)nm
RANLIB = $(CROSS)ranlib

LINUXDIR	:= $(shell cd ..; if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)/linux
HPATH   	= $(LINUXDIR)/include

CFLAGS = -O2 -fomit-frame-pointer -I$(HPATH)

#

SUBDIRS := picogui_client pg_demo

.EXPORT_ALL_VARIABLES:

all: bin
	for i in $(SUBDIRS) ; do make -C $$i || exit; done
	cp `find -name \*.coff | sed -e s/.coff//` bin

clean:
	rm -f *.[oa] *~ core
	rm -f bin/*
	for i in $(SUBDIRS) ; do make -C $$i clean; done

bin:
	if [ ! -d bin ]; then mkdir bin; fi

# eof
