TRUNK=../..
STDFRG=$(TRUNK)/src/plugins/std_forge

include $(TRUNK)/Makefile.conf
include $(LIBRND_MAK)

CC = $(SCH_RND_CC)
CFLAGS = $(CFLAGS_LIBRND) -I$(STDFRG) -I$(TRUNK)/src -I$(TRUNK)/src/plugins
LDFLAGS = $(LIB_RND_LDFLAGS_EXTRA) $(LDFLAGS_LIBRND)
LDLIBS = -lrnd-3rd


all: std_forge_cond

std_forge_cond: $(STDFRG)/cond_gram.o std_forge_cond.o
	$(CC) -o std_forge_cond  std_forge_cond.o $(STDFRG)/cond_gram.o $(LDFLAGS) $(LDLIBS)

$(STDFRG)/cond_gram.o: $(STDFRG)/cond_gram.c $(STDFRG)/cond.h
	$(CC) -c $(CFLAGS) -o $(STDFRG)/cond_gram.o $(STDFRG)/cond_gram.c

$(STDFRG)/cond_gram.c $(STDFRG)/cond_gram.h: $(STDFRG)/cond_gram.y
	@echo "(not running byaccic from make test)"

std_forge_cond.o: std_forge_cond.c $(STDFRG)/cond.h
	$(CC) -c $(CFLAGS) -o std_forge_cond.o std_forge_cond.c

test:
	cd regression && ./Test.sh

clean:
	-rm cond cond.c regression/*.out
