#
# Pablo System: Visual/Src/System/Build/FunctionalUnits/Makefile
#       Generates object files listed in ./ObjFiles (and SoundObjFiles if
#	building with Audio) and adds them to library.
#
.PHONY : Makefile ../Makefile.common

MYTOP 		:= ..
OBJECTS 	:= $(shell cat ./ObjFiles)

LOCAL_DIR 	:= FunctionalUnits
LOCAL_SRCDIRS 	:= ../../$(LOCAL_DIR)
LOCAL_INCLUDES   = -I$(TOP)/Visual/Src/Widgets/Includes \
 	           -I$(TOP)/Visual/Src/Widgets/Wrappers \
		   -I$(TOP)/Visual/Src/Motif/Includes \
		   $(WCL_INCDIR) \
		   $(MOTIF_INCDIR) \
		   $(X11_INCDIR)

#
# Here we explicitly include the master Makefile.defines file so that
# we have the correct value of USE_AUDIO.  Usually ../Makefile.common
# includes the file but that's too late here#
#
TOP := $(MYTOP)/../../../..
.PHONY : $(TOP)/Makefile.defines
include  $(TOP)/Makefile.defines

ifeq ($(strip $(USE_AUDIO)),yes)
 OBJECTS += $(shell cat SoundObjFiles)
 LOCAL_INCLUDES += -I../../../Audio/Includes
endif

include ../Makefile.common
    
