# @(#)GNUmakefile	1.46 98/08/19

BUILDDIR = ../..
include $(BUILDDIR)/Platform.gmk
PACKAGE = java.awt
PRODUCT = sun
include $(BUILDDIR)/makefiles/Defs.gmk

#
# Rules
#
all: sources classes properties cursors

#
# Files
#
include $(MINCLUDES)java_awt.jmk

SOURCEPATH = $(BUILDDIR)/javax/swing/1.2_src:$(SHARE_SRC)/classes

#
# Rules
#
include $(BUILDDIR)/makefiles/Classes.gmk

sources: swing_sources
#
# Extra things we want to do.
#
OPTIMIZED += properties cursors
DEBUG += properties cursors
clean:: sources.clean properties.clean sun.geom.clean cursors.clean

swing_sources:
	cd $(BUILDDIR)/javax/swing; $(MAKE) sources

sources.clean:
	cd $(BUILDDIR)/javax/swing; $(MAKE) clean

_LIBPROPS = \
	flavormap.properties

_RESOURCES = \
	awt.properties		\
	awt_ja.properties

LIBPROPS = $(_LIBPROPS:%=$(LIBDIR)/%)
RESDIR = $(CLASSBINDIR)/java/awt/resources
RESOURCES = $(_RESOURCES:%=$(RESDIR)/%)

properties: $(LIBDIR) $(LIBPROPS) $(RESDIR) $(RESOURCES)

$(LIBDIR)/%.properties: $(PLATFORM_SRC)/lib/%.properties
	@echo Installing resource: $@
	@$(RM) $@
	@cp $< $@

$(RESDIR)/%.properties: \
		$(SHARE_SRC)/classes/java/awt/resources/%.properties
	@echo Installing resource: $@
	@$(RM) $@
	@cp $< $@

properties.clean :
	$(RM) $(LIBPROPS)
	$(RM) -r $(RESDIR)

$(RESDIR):
	mkdir -p $@

.SUFFIXES : $(SUFFIXES) .gif .properties

CURSORSRC     = $(TOPDIR)/src/share/lib/images/cursors
CURSORDIR     = $(LIBDIR)/images/cursors
CURSORPROPSRC = $(TOPDIR)/src/solaris/lib/images/cursors

CURSORS   = $(CURSORDIR)/motif_CopyDrop32x32.gif	\
	    $(CURSORDIR)/motif_MoveDrop32x32.gif	\
	    $(CURSORDIR)/motif_LinkDrop32x32.gif	\
	    $(CURSORDIR)/motif_CopyNoDrop32x32.gif	\
	    $(CURSORDIR)/motif_MoveNoDrop32x32.gif	\
	    $(CURSORDIR)/motif_LinkNoDrop32x32.gif	\
	    $(CURSORDIR)/invalid32x32.gif

$(CURSORDIR) :
	mkdir -p $(CURSORDIR)

$(CURSORDIR)/cursors.properties : $(CURSORPROPSRC)/cursors.properties
	@rm -f $@
	cp $< $@

$(CURSORDIR)/%.gif : $(CURSORSRC)/%.gif
	cp $< $@

cursors : $(CURSORDIR) $(CURSORDIR)/cursors.properties $(CURSORS)

sun.geom.clean :
	rm -rf $(CLASSBINDIR)/sun/awt/geom

cursors.clean :
	rm -rf $(CURSORDIR)

$(LIBDIR) :
	mkdir -p $(LIBDIR)

.PHONY: 
