OUTS:= cnmillgui all : $(OUTS) SRCS :=clienti2c.c os_generic.c cnmillgui.c cnmillbackend.c chash.c stringutil.c milldriver.c scripting.c simscreen.c networkstub.c stdoutmanager.c stops.c OBJS :=clienti2c.o os_generic.o cnmillgui.o cnmillbackend.o chash.o stringutil.o milldriver.o scripting.o simscreen.o network.o stdoutmanager.o stops.o LINLDFLAGS:=-lusb -lpthread -lm GTKFLAGS:=$(shell pkg-config --cflags gtk+-3.0) $(shell pkg-config --libs gtk+-3.0) BASECFLAGS:=-D_GNU_SOURCE -Os -Ilibusb/libusb-win32-bin-1.2.6.0/include -g CFLAGS:=$(BASECFLAGS) $(GTKFLAGS) cnmillgui : $(OBJS) gcc -o $@ $^ $(LINLDFLAGS) $(CFLAGS) val : cnmillgui G_DEBUG=cleanup G_SLICE=always-malloc,debug-blocks valgrind --tool=memcheck --leak-check=full --num-callers=20 --log-file=vgdump --suppressions=gtk.suppress ./cnmillgui #windows http://www.tarnyko.net/en/?q=node/45 WINLDFLAGS:=-lws2_32 libusb/libusb-win32-bin-1.2.6.0/lib/gcc/libusb.a cnmillgui.exe : $(SRCS) getline.c i686-w64-mingw32-gcc $(BASECFLAGS) -o $@ $^ $(WINLDFLAGS) $(shell export PKG_CONFIG_PATH=/opt/gtk3-win32/lib/pkgconfig; pkg-config --cflags --libs gtk+-3.0) clean : rm -rf $(OUTS) *~ *.o *.exe