#
# File:		makefile.unx
# Author:	Julian Smart
# Created:	1993
# Updated:	
# Copyright:	(c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile for colour display example (UNIX).
# Change the WXDIR directory, and CPPFLAGS and LDFLAGS, for your system.

WXDIR = ../..

# All common UNIX compiler flags and options are now in
# this central makefile.
include $(WXDIR)/src/make.env

OBJECTS = $(OBJDIR)/colours.$(OBJSUFF)

.SUFFIXES:

all:	$(OBJDIR) colours$(GUISUFFIX)

wxmotif:
	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif

wxxview:
	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview

# For SGI, include -lPW on your LDLIBS
motif:
	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif OPT='$(OPT)'
	$(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' WXLIB=$(WXDIR)/lib/libwx_motif.a XVIEW_LINK=

xview:
	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview OPT='$(OPT)'
	$(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol OPT='$(OPT)'

hp:
	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx hp
	$(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC OPT='' DEBUG='$(DEBUG)' DEBUGFLAGS='-g' WARN='-w' \
           XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' CCLEX='cc' \
           LDLIBS='$(HPLDLIBS)'

$(OBJDIR):
	mkdir $(OBJDIR)

colours$(GUISUFFIX): $(OBJDIR)/colours.$(OBJSUFF) $(WXLIB)
	$(CC) $(LDFLAGS) -o colours$(GUISUFFIX) $(OBJDIR)/colours.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS)

$(OBJDIR)/colours.$(OBJSUFF):        colours.$(SRCSUFF)
	$(CC) -c $(CPPFLAGS) -o $@ colours.$(SRCSUFF)

clean_motif:
	$(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany

clean_ol:
	$(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany

clean_hp:
	$(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany

cleanany:
	rm -f $(OBJECTS) colours$(GUISUFFIX) core

wxclean_ol:
	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_ol

wxclean_motif:
	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_motif

wxclean_hp:
	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_hp

