#
# $RCSfile: Makefile.nolibs,v $
#
# x-kernel v3.3
#
# Copyright (c) 1996,1993,1991,1990  Arizona Board of Regents
#
# $Log: Makefile.nolibs,v $
# Revision 1.5  1996/06/05 16:44:11  slm
# Removed references to simulator/pi directory.
#
# Revision 1.4  1996/02/01  15:44:18  slm
# Cosmetic changes.
#
# Revision 1.3  1995/10/26  15:50:24  slm
# Fix for mkdir on linux.
#
# Revision 1.2  1995/10/17  20:31:49  slm
# Create
#
# Revision 1.1  1995/07/28  22:32:14  slm
# Initial revision
#
# Revision 1.1  1994/11/22  21:11:37  hkaram
# Initial revision
#
# Revision 1.17.1.1  1994/10/28  18:24:43  hkaram
# New branch
#
# Revision 1.17  1994/01/10  18:05:34  menze
#   [ 1993/12/23          menze ]
#   Added filter to let platform-specific files override
#   platform-independent files of the same name.
#
# Makefile directives for building without libraries
#

XLIBS :=

$(XRT)/protocols/COMS/ComposeFiles.$(HOW):
	@if [ ! -d $(dir $@) ] ; then                                 \
	    umask 2 ; mkdir $(shell echo $(dir $@) | sed 's+/$$++') ; \
	    touch $@ ;                                                \
	else                                                          \
	    rm -f $@ ; umask 2 ; touch $@ ;                           \
	fi
#	@make protCompose

$(XRT)/simulator/protocols/COMS/ComposeFiles.$(HOW):
	@if [ ! -d $(dir $@) ] ; then                                 \
	    umask 2 ; mkdir $(shell echo $(dir $@) | sed 's+/$$++') ; \
	    touch $@ ;                                                \
	else                                                          \
	    rm -f $@ ; umask 2 ; touch $@ ;                           \
	fi
#	@make protsimCompose

$(XRT)/simulator/platforms/$(XPLATFORM)/COMS/ComposeFiles.$(HOW):
	@if [ ! -d $(dir $@) ] ; then                                 \
	    umask 2 ; mkdir $(shell echo $(dir $@) | sed 's+/$$++') ; \
	    touch $@ ;                                                \
	else                                                          \
	    rm -f $@ ; umask 2 ; touch $@ ;                           \
	fi
#	@make pdCompose

$(XRT)/simulator/sim/COMS/ComposeFiles.$(HOW):
	@if [ ! -d $(dir $@) ] ; then                                 \
	    umask 2 ; mkdir $(shell echo $(dir $@) | sed 's+/$$++') ; \
	    touch $@ ;                                                \
	else                                                          \
	    rm -f $@ ; umask 2 ; touch $@ ;                           \
	fi
#	@make simCompose

$(XRT)/pi/COMS/ComposeFiles.$(HOW): 		
	@if [ ! -d $(dir $@) ] ; then                                 \
	    umask 2 ; mkdir $(shell echo $(dir $@) | sed 's+/$$++') ; \
	    touch $@ ;                                                \
	else                                                          \
	    rm -f $@ ; umask 2 ; touch $@ ;                           \
	fi
#	@make piCompose

XK_NO_LIBRARIES := TRUE

# include top level protocol directories

STD_OBJ :=
include $(XRT)/protocols/COMS/ComposeFiles.$(HOW)
include $(XRT)/protocols/ComposeHacks

# the simulator protocol directories will override the ones in the global
# directory

STD_OBJ :=
include $(XRT)/simulator/protocols/COMS/ComposeFiles.$(HOW)
include $(XRT)/simulator/protocols/ComposeHacks

# include simulator platform specific directories

STD_OBJ :=
include $(XRT)/simulator/platforms/$(XPLATFORM)/COMS/ComposeFiles.$(HOW)
include $(XRT)/simulator/platforms/$(XPLATFORM)/ComposeHacks
PLAT_STD_OBJ := $(STD_OBJ)

# include simulator sim files

STD_OBJ :=
include $(XRT)/simulator/sim/COMS/ComposeFiles.$(HOW)
SIM_STD_OBJ := $(STD_OBJ)

# include top level pi files

STD_OBJ :=
include $(XRT)/pi/COMS/ComposeFiles.$(HOW)
PI_GLOBAL_STD_OBJ := $(STD_OBJ)

# Files in the platform-specific area override files by the same name in the
# platform-independent area.  This filter implements that policy.

PI_FILTERED_OBJ := $(filter-out $(addprefix %/, $(notdir $(PLAT_STD_OBJ))), $(PI_GLOBAL_STD_OBJ))

# COMPOSE_LIB_OBJ is defined in Makefile.local in the build directory, which
# is built by compose from graph.comp.  It names the collections which should
# be included in the LIB_OBJ object list.

TMP_LIB_OBJ = $(addprefix $(XRT)/,                              \
              $(PI_FILTERED_OBJ) $(PLAT_STD_OBJ) $(SIM_STD_OBJ) \
              $(sort $(COMPOSE_LIB_OBJ)))

# If there is locally compiled source, strip object files with the same name
# from the LIB_OBJ list.

ifeq ($(PRIVOBJ),)
LIB_OBJ = $(TMP_LIB_OBJ)
else
LIB_OBJ = $(filter-out $(addprefix %/, $(notdir $(PRIVOBJ))), $(TMP_LIB_OBJ))
endif

COMPOSE_LIBS := $(sort $(COMPOSE_EXT_LIBS))
