
#
# makefile
#
# Copyright (C) 1994 Be Inc.  All Rights Reserved
#

SHELL		:= /bin/sh

#######
include $(BUILDHOME)/buildprefs/make.pre
#######

INCLUDES	+= -I. -Iglob
CFLAGS		+= \
				-DHAVE_CONFIG_H \
				-DLIBDIR=\"/boot/beos/system/lib\" \
				-DINCLUDEDIR=\"/boot/develop/headers/gnu\"

ifeq ($(COMPILER), metrowerks)
	CFLAGS	+= -DNO_ARCHIVES=1
	# 2/4/99 PowerPC compiler generates bad crashing code at O3
	CFLAGS	+= -O2
endif

TARGET		= $(OBJ_DIR)/make

APP_VERSION     = -app 3 77 0 f 0 -short 3.77 -long "3.77 "`echo -n -e '\302\251'`"1999 The Free Software Foundation"

SRCS		= \
				ar.c \
				arscan.c \
				commands.c \
				default.c \
				dir.c \
				expand.c \
				file.c \
				function.c \
				getloadavg.c \
				implicit.c \
				job.c \
				main.c \
				misc.c \
				read.c \
				remake.c \
				remote-stub.c \
				rule.c \
				signame.c \
				variable.c \
				version.c \
				vpath.c

OBJS		:= $(SRCS_LIST_TO_OBJS)

LIB		:= glob/$(OBJ_DIR)/libglob.a

$(TARGET):	$(OBJ_DIR) $(OBJS) $(LIB)
		$(LD) -o $@ $(OBJS) $(LDFLAGS) $(LIB)
		$(SETVERSION) $@ $(SYSTEM_VERSION) $(APP_VERSION)
$(LIB):
		cd glob; $(MAKE) $(PARALLELMFLAGS)

clean::
		cd glob; $(MAKE) $(PARALLELMFLAGS) clean

#######
include $(BUILDHOME)/buildprefs/make.post
#######
