blob: 9566a19f56331ed63cc2e6a5b11711ccd53eec2e [file] [log] [blame]
Nicolas Pennequin3e2c51d2007-11-22 18:07:40 +00001CFLAGS = -Wall
2LIBS = -lmtp
3OUTPUT = sendfirm
Nicolas Pennequin6a3779b2009-02-18 14:50:46 +00004EXTRA_CFLAGS = $(shell printf \
5 '\#include <libmtp.h>\nlibmtp version: LIBMTP_VERSION\n' | \
Andrew Mahonef9b75722009-02-08 16:59:06 +00006 gcc -E -P - -o - | grep -q '^libmtp version: 0\.2' && echo '-DOLDMTP')
Nicolas Pennequin3e2c51d2007-11-22 18:07:40 +00007
8all: $(OUTPUT)
9
10$(OUTPUT): sendfirm.c
Andrew Mahonef9b75722009-02-08 16:59:06 +000011 gcc $(EXTRA_CFLAGS) $(CFLAGS) $(LIBS) -o $(OUTPUT) sendfirm.c
Nicolas Pennequin3e2c51d2007-11-22 18:07:40 +000012
Maurus Cuelenaere93665012008-07-03 23:30:28 +000013$(OUTPUT).exe: sendfirm_win.c
Maurus Cuelenaere46d83022008-07-04 11:38:08 +000014 mingw32-gcc $(CFLAGS) -o $(OUTPUT).exe sendfirm_win.c MTP_DLL.dll
Maurus Cuelenaere93665012008-07-03 23:30:28 +000015
Nicolas Pennequin3e2c51d2007-11-22 18:07:40 +000016clean:
17 rm -f $(OUTPUT)