]>
Commit | Line | Data |
---|---|---|
940a2012 | 1 | WINCC=c:\mingw\bin\gcc |
2 | ||
709b784c | 3 | #COMMON_FLAGS = -m32 |
a99c6a19 | 4 | LDLIBS = -L/opt/local/lib -L/usr/local/lib -lusb -lreadline -lpthread |
709b784c | 5 | LDFLAGS = $(COMMON_FLAGS) |
6 | CFLAGS = -I. -I/opt/local/include -Wall -Wno-unused-function $(COMMON_FLAGS) | |
6658905f | 7 | |
940a2012 | 8 | WINLIBS = -lgdi32 -lsetupapi |
a99c6a19 | 9 | #CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall -arch i386 -D_ |
10 | #QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null) -arch i386 | |
6658905f | 11 | |
789d706a | 12 | ifneq ($(QTLDLIBS),) |
6658905f | 13 | QTGUI = proxgui.o proxguiqt.o proxguiqt.moc.o |
14 | CFLAGS += -DHAVE_GUI | |
15 | MOC = $(shell type moc-qt4 >/dev/null 2>&1 && echo moc-qt4 || echo moc) | |
16 | LINK.o = $(LINK.cpp) | |
17 | else | |
18 | QTGUI = guidummy.o | |
19 | endif | |
20 | ||
940a2012 | 21 | ifeq ($(shell echo ""),) |
22 | RM = rm -f | |
23 | BINS = proxmark3 snooper cli flasher | |
24 | CLEAN = cli flasher proxmark3 snooper *.o *.moc.cpp | |
25 | else | |
26 | RM = del | |
27 | BINS = prox.exe | |
28 | CLEAN = prox.exe | |
29 | endif | |
30 | ||
31 | all: $(BINS) | |
6658905f | 32 | |
709b784c | 33 | all-static: LDLIBS:=-static $(LDLIBS) |
34 | all-static: snooper cli flasher | |
35 | ||
940a2012 | 36 | prox.exe: prox.c wingui.c command.c |
37 | $(WINCC) $(CFLAGS) $(DEFINES) -o prox.exe prox.c wingui.c command.c $(WINLIBS) | |
38 | ||
709b784c | 39 | proxmark3: LDLIBS+=$(QTLDLIBS) |
6658905f | 40 | proxmark3: proxmark3.o gui.o command.o usb.o $(QTGUI) |
41 | ||
a99c6a19 | 42 | command.o: command.c |
3f030abe | 43 | |
6658905f | 44 | snooper: snooper.o gui.o command.o usb.o guidummy.o |
45 | ||
db917a16 | 46 | cli: cli.o gui.o command.o usb.o guidummy.o |
47 | ||
06735128 | 48 | flasher: flasher.o usb.o |
49 | ||
6658905f | 50 | proxguiqt.moc.cpp: proxguiqt.h |
51 | $(MOC) -o$@ $^ | |
52 | ||
53 | clean: | |
940a2012 | 54 | $(RM) $(CLEAN) |
6658905f | 55 | |
56 | .PHONY: all clean |