
VERSION = 0.1
CC = gcc
CFLAGS = `libusb-config --cflags` -W -Wall -g
LDFLAGS = `libusb-config --libs`
OBJS = gplink.o gp32cmds.o usb_drv.o fpk.o

all: gplink
	gcc mshgp32.c -o mshgp32

gplink: ${OBJS}

static: ${OBJS}
	${CC} -static -o ../gplink ${OBJS} ${LDFLAGS}

clean:
	rm -f *~ *.o gplink.core

ejec:
	rm -f mshgp32 gplink

dist: static clean ejec
	cd ..
	tar czvf mshgp32-${VERSION}-src.tar.gz *
	echo "Distribucion fuente completa"
dist-bin: static clean
	cd ..
	tar czvf mshgp32-${VERSION}-bin.tar.gz *
	echo "Distribucion fuente completa con binarios"
