# The following variables are configurable.
#-----------------------------------#
LOCALCFLAGS :=
LOCALIFLAGS := -I/users/sys/empire/EMP/h
LOCALLFLAGS :=
LOCALSFLAGS :=

LIBS := ../lib/$(ARCH)/libcommon.a ../lib/$(ARCH)/libgen.a \
	../lib/$(ARCH)/libglobal.a
BINS := empchk file land ore randpop vchk setup land_old wldchk newore
#-----------------------------------#

# Productions:
#	depend:	create the dependencies
#	all:	make the library
#	saber:	load things for saber
#	tags:	make tags

include ../make/GenMakefile
include $(DEPENDENCIES)

all: $(BINS)

ifdef ARCH

%: %.c
	$(CC) $(IFLAGS) $(CFLAGS) $< $(LIBS) $(TAILLIBS) -o $(ARCH)/$*

clean:
	rm -f $(BINS) *.o

install:
	cd $(ARCH); cp $(BINS) $(BINDIR)/

else

%: %.c
	$(CC) $(IFLAGS) $(CFLAGS) $< $(LIBS) $(TAILLIBS) -o $*

clean:
	rm -f $(BINS) *.o

install:
	cp $(BINS) $(BINDIR)/

endif
