2007-11-22 18:07:40 +00:00
|
|
|
CFLAGS = -Wall
|
|
|
|
LIBS = -lmtp
|
|
|
|
OUTPUT = sendfirm
|
2009-02-08 16:59:06 +00:00
|
|
|
EXTRA_CFLAGS = $(shell echo -e \
|
|
|
|
'\#include <libmtp.h>\nlibmtp version: LIBMTP_VERSION' | \
|
|
|
|
gcc -E -P - -o - | grep -q '^libmtp version: 0\.2' && echo '-DOLDMTP')
|
2007-11-22 18:07:40 +00:00
|
|
|
|
|
|
|
all: $(OUTPUT)
|
|
|
|
|
|
|
|
$(OUTPUT): sendfirm.c
|
2009-02-08 16:59:06 +00:00
|
|
|
gcc $(EXTRA_CFLAGS) $(CFLAGS) $(LIBS) -o $(OUTPUT) sendfirm.c
|
2007-11-22 18:07:40 +00:00
|
|
|
|
2008-07-03 23:30:28 +00:00
|
|
|
$(OUTPUT).exe: sendfirm_win.c
|
2008-07-04 11:38:08 +00:00
|
|
|
mingw32-gcc $(CFLAGS) -o $(OUTPUT).exe sendfirm_win.c MTP_DLL.dll
|
2008-07-03 23:30:28 +00:00
|
|
|
|
2007-11-22 18:07:40 +00:00
|
|
|
clean:
|
|
|
|
rm -f $(OUTPUT)
|