default : build;

SOURCE_PATHS := core library/protocol/miniproto \
                library/protocol/protoc-gen-pascal

PROGNAME=protoc-gen-pas

include Makefile.node

build   : fpcprog test;
run     : progrun;
clean   : cleancur;
test    : fpcprog
	$(PROTOC) -I. --pas_out=test google/protobuf/plugin.proto
	$(CP) test/descriptor_pb.pas ../protoc-gen-pascal/descriptor_pb.pas
	$(CP) test/plugin_pb.pas ../protoc-gen-pascal/plugin_pb.pas
	$(FPC) $(FPC_OPTIONS) test/descriptor_pb.pas
	$(FPC) $(FPC_OPTIONS) test/plugin_pb.pas
