# 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 :=  files land ore fairland perfect pconfig


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

# 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 $(filter-out -l%,$(LIBS))
	$(CC) $(IFLAGS) $(CFLAGS) $< $(LIBS) $(TAILLIBS) -o $(ARCH)/$*

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

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

else

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

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

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

endif
