################################################################################
#  THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY  #
#  Read the zproject/README.md for information about making permanent changes. #
################################################################################

CC=gcc
# replace the following with wherever you have installed libzmq
PREFIX=c:/mingw/msys/1.0/local
INCDIR=-I$(PREFIX)/include -I.
LIBDIR=-L$(PREFIX)/lib
CFLAGS=-Wall -Os -g -DZYRE_EXPORTS $(INCDIR)

OBJS = zyre.o zyre_event.o zre_msg.o zyre_peer.o zyre_group.o zyre_election.o zyre_node.o zyre_private_selftest.o

%.o: ../../src/%.c
	$(CC) -c -o $@ $< $(CFLAGS)

all: libzyre.dll zyre_selftest.exe

libzyre.dll: $(OBJS)
	$(CC) -shared -o $@ $(OBJS) -Wl,--out-implib,$@.a $(LIBDIR) -lzmq -lws2_32 -liphlpapi -lrpcrt4

# the test functions are not exported into the DLL
zyre_selftest.exe: zyre_selftest.o $(OBJS)
	$(CC) -o $@ $^ $(LIBDIR) -lzmq -lws2_32 -liphlpapi -lrpcrt4

clean:
	del *.o *.a *.dll *.exe

################################################################################
#  THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY  #
#  Read the zproject/README.md for information about making permanent changes. #
################################################################################
