
#   cd sankit/SAN_SRC && make lib   (only needed once, or after editing the library)

SRC=	sankit/SAN_SRC
LIB=	$(SRC)/libsan.a

CC=	gcc
CFLAGS=	-pedantic -Wall -O -I$(SRC)

SOURCES=	$(wildcard [0-9]*.c)
PROGRAMS=	$(SOURCES:.c=)

all:	$(LIB) $(PROGRAMS)

$(LIB):
	$(MAKE) -C $(SRC) lib

%:	%.c _common.h $(LIB)
	$(CC) $(CFLAGS) -o $@ $< $(LIB)

clean:
	rm -f $(PROGRAMS)

.PHONY:	all clean
