# The following variables are configurable.
#-----------------------------------#
LOCALCFLAGS :=
LOCALIFLAGS := 
LOCALLFLAGS :=
LOCALSFLAGS :=

LIBS := ../lib/$(ARCH)/libsubs.a ../lib/$(ARCH)/libcommon.a \
	../lib/$(ARCH)/libgen.a ../lib/$(ARCH)/libglobal.a -lc
BINS := perfect rescheck new_ore empchk files land ore randpop vchk setup land_old wldchk newore fairland


#-----------------------------------#

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

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

all:
	touch *.c
	gnumake all2

all2: $(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
