# tag: Makefile for unix hosted bootstrap forth kernel
#
# Copyright (C) 2003 Patrick Mauritz, Stefan Reinauer
#
# See the file "COPYING" for further information about
# the copyright and warranty status of this work.
#

OBJS_BOOTSTRAP   =  unix.o plugins.o
OBJS_GENERIC	 =  primitives.o stack.o dict.o lib.o

INCLUDES := -I$(TOPDIR)/include -I$(BUILDDIR)
LDFLAGS  := $(LDFLAGS) -rdynamic -ldl

include $(TOPDIR)/Rules.make

all:	core unix

core:
	echo -e "\nBuilding files for unix hosted bootstrap"

unix.nostrip: $(OBJS_GENERIC) $(OBJS_BOOTSTRAP)
	echo -n "  linking unix bootstrap... "
	cd $(BUILDDIR) && $(CC) $(LDFLAGS) -o $@ $^
	echo -e "\t\tok"

unix: unix.nostrip
	cd $(BUILDDIR) && cp $< $@ && strip -R .note -R .comment $@


# dependencies. these are so small that we write them manually.
unix.o:	config.h types.h dict.h stack.h unix.c

