rockbox/utils/MTP/Makefile
James Buren ab0f23c4b1 sendfirm: fix some minor issues
This patches some compile warnings and also makes it work correctly
with modern mingw64.

Change-Id: I8cd292bc989ae04bbaa1d7149d58d6d833a51c0a
2021-06-11 19:32:35 +00:00

17 lines
460 B
Makefile

CFLAGS = -Wall
LIBS = -lmtp
OUTPUT = sendfirm
EXTRA_CFLAGS = $(shell printf \
'\#include <libmtp.h>\nlibmtp version: LIBMTP_VERSION\n' | \
gcc -E -P - -o - | grep -q '^libmtp version: 0\.2' && echo '-DOLDMTP')
all: $(OUTPUT)
$(OUTPUT): sendfirm.c
gcc $(EXTRA_CFLAGS) $(CFLAGS) -o $(OUTPUT) sendfirm.c $(LIBS)
$(OUTPUT).exe: sendfirm_win.c
i686-w64-mingw32-gcc $(CFLAGS) -o $(OUTPUT).exe sendfirm_win.c MTP_DLL.dll
clean:
rm -f $(OUTPUT) $(OUTPUT).exe