]>
Commit | Line | Data |
---|---|---|
709b784c | 1 | #COMMON_FLAGS = -m32 |
2 | LDLIBS = -L/usr/local/lib -lusb -lreadline -lpthread | |
3 | LDFLAGS = $(COMMON_FLAGS) | |
4 | CFLAGS = -I. -I/opt/local/include -Wall -Wno-unused-function $(COMMON_FLAGS) | |
6658905f | 5 | |
6 | CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall | |
709b784c | 7 | QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null) |
6658905f | 8 | |
789d706a | 9 | ifneq ($(QTLDLIBS),) |
6658905f | 10 | QTGUI = proxgui.o proxguiqt.o proxguiqt.moc.o |
11 | CFLAGS += -DHAVE_GUI | |
12 | MOC = $(shell type moc-qt4 >/dev/null 2>&1 && echo moc-qt4 || echo moc) | |
13 | LINK.o = $(LINK.cpp) | |
14 | else | |
15 | QTGUI = guidummy.o | |
16 | endif | |
17 | ||
06735128 | 18 | all: proxmark3 snooper cli flasher |
6658905f | 19 | |
709b784c | 20 | all-static: LDLIBS:=-static $(LDLIBS) |
21 | all-static: snooper cli flasher | |
22 | ||
23 | proxmark3: LDLIBS+=$(QTLDLIBS) | |
6658905f | 24 | proxmark3: proxmark3.o gui.o command.o usb.o $(QTGUI) |
25 | ||
cd00aa30 | 26 | command.o: command.cpp translate.h |
3f030abe | 27 | |
6658905f | 28 | snooper: snooper.o gui.o command.o usb.o guidummy.o |
29 | ||
db917a16 | 30 | cli: cli.o gui.o command.o usb.o guidummy.o |
31 | ||
06735128 | 32 | flasher: flasher.o usb.o |
33 | ||
6658905f | 34 | proxguiqt.moc.cpp: proxguiqt.h |
35 | $(MOC) -o$@ $^ | |
36 | ||
37 | clean: | |
06735128 | 38 | rm -f cli flasher proxmark3 snooper *.o *.moc.cpp |
6658905f | 39 | |
40 | .PHONY: all clean |