#-------------------------------------------------------
#
#	Generic Crossplatform Makefile
#
#	Author:	stephen beaulieu <hippo@be.com>
#
#	Questions, comments & concerns to <devsupport@be.com>
#
#	Copyright 1998 Be, Inc.  All Rights Reserved
#
#	Fill out the Project Specific Information section
#	Use a \ to continue information on different lines
#	example: SRCS = source1.cpp \
#					source2.cpp
#
#	When done simply cd to the directory in the terminal
#	and type make.  The objects and binary will appear
#	in an obj.x86 or obj.PPC folder.
#
#--------------------------------------------------------

	ARPROOT		= ..
	
#--------------------------------------------------------
#	High-level Project Information
#--------------------------------------------------------

#	specify the name of the project
	IMG_NAME	= makearpicons
	
#	specify the type of image to create
	IMG_TYPE	= APP

#	specify version of project
	VERSION		= 1.0
	
# first include the common rules for setting up all
# platform-specific information

include $(ARPROOT)/makefiles/platform

#--------------------------------------------------------
#	Project Specific Information
#--------------------------------------------------------

#	specify the list of source files
	SRCS		= $(shell echo *.cpp)
	HEADERS		= $(shell echo *.h)
	
ifeq ($(CPU), PPC)
	CFLAGS		= -str pool -ansi strict -bool on -requireprotos
	CFLAGS		+= -str ro -toc_data on 
endif

ifeq ($(CPU), PPC)
	LDFLAGS		= -dead on
endif

#	specify the list of resource files
	RSRCS		= makearpicons
	
#	specify how to create distribution
	DIST_MAKES	= 
	DIST_SRCDIR	= makearpicons
	DIST_FILES	= README
	DIST_SRCS	= $(HEADERS) $(SRCS) $(DIST_FILES) \
					$(RSRCS) Makefile MakeApp
	
#	specify any additional beos shared libraries needed.
	ADD_BESHLIBS	= translation

#	specify additional non-beos shared libraries needed.
	ADD_SHLIBS		= $(CPPLIB)
	ADD_STLIBS		= $(shell echo $(ARPROOT)/ArpLib/$(OBJ_DIR)/*.a)

#	specify any additional beos static libraries needed.
	ADD_BESTLIBS	= 

#	specify additional non-beos static libraries needed.

#	specify any additional system include paths.
	SYSTEM_INCLUDES	=
	SYSLOCAL_INCLUDES	= $(ARPROOT)/ArpHeader/

#	specify any additional local include paths.
	LOCAL_INCLUDES	=

#--------------------------------------------------------
#	Build Rules
#--------------------------------------------------------

# Special rules for copying application into public directory

	DEST_DIR	= ./
	PUBLIC_TARGET	= $(DEST_DIR)$(TARGET_NAME)

# define the actual work to be done	

default: $(PUBLIC_TARGET)

$(PUBLIC_TARGET): $(TARGET)
	mkdir --parents $(shell dirname $@)
	$(COPY) $< $@
	[ -e $<.xSYM ] || $(COPY) $<.xSYM $@.xSYM > /dev/null 2>&1
	-$(COPY) $<.xMAP $@.xMAP

clean:: clean_project
	rm -f $(PUBLIC_TARGET) $(PUBLIC_TARGET).xSYM $(PUBLIC_TARGET).xMAP $(PUBLIC_TARGET).dbg

dist:: dist_project

# include common build rules for above definitions

include $(ARPROOT)/makefiles/project

depends: $(DEPENDENCIES)
	@echo >/dev/null
