8 LDLIBS
= -L
/opt
/local
/lib
-L
/usr
/local
/lib
-lusb
-lreadline
-lpthread
9 LDFLAGS
= $(COMMON_FLAGS
)
10 CFLAGS
= -std
=gnu99
-I.
-I..
/include -I..
/common
-I
/opt
/local
/include -Wall
-Wno-unused-function
$(COMMON_FLAGS
) -g3
12 CXXFLAGS
= $(shell pkg-config
--cflags QtCore QtGui
2>/dev
/null
) -Wall
13 QTLDLIBS
= $(shell pkg-config
--libs QtCore QtGui
2>/dev
/null
)
35 CMDOBJS
= $(CMDSRCS
:%.c
=$(OBJDIR
)/%.o
)
37 ifeq ($(shell uname
),Darwin
)
38 CXXFLAGS
= -I
/Library
/Frameworks
/QtGui.framework
/Versions
/Current
/Headers
-I
/Library
/Frameworks
/QtCore.framework
/Versions
/Current
/Headers
39 QTLDLIBS
= -framework QtGui
-framework QtCore
44 QTGUI
= $(OBJDIR
)/proxgui.o
$(OBJDIR
)/proxguiqt.o
$(OBJDIR
)/proxguiqt.moc.o
46 MOC ?
= $(shell pkg-config
--variable
=moc_location QtCore
)
53 BINS
= proxmark3 snooper cli flasher
54 CLEAN
= cli cli.exe flasher flasher.exe proxmark3 proxmark3.exe snooper snooper.exe
$(CMDOBJS
) $(OBJDIR
)/*.o
*.o
*.moc.
cpp
58 all-static
: LDLIBS
:=-static
$(LDLIBS
)
59 all-static
: snooper cli flasher
61 proxmark3
: LDLIBS
+=$(QTLDLIBS
)
62 proxmark3
: $(OBJDIR
)/proxmark3.o
$(CMDOBJS
) $(OBJDIR
)/proxusb.o
$(QTGUI
)
63 $(CXX
) $(CXXFLAGS
) $^
$(LDLIBS
) -o
$@
65 snooper
: $(OBJDIR
)/snooper.o
$(CMDOBJS
) $(OBJDIR
)/proxusb.o
$(OBJDIR
)/guidummy.o
66 $(CXX
) $(CXXFLAGS
) $^
$(LDLIBS
) -o
$@
68 cli
: $(OBJDIR
)/cli.o
$(CMDOBJS
) $(OBJDIR
)/proxusb.o
$(OBJDIR
)/guidummy.o
69 $(CXX
) $(CXXFLAGS
) $^
$(LDLIBS
) -o
$@
71 flasher
: $(OBJDIR
)/flash.o
$(OBJDIR
)/flasher.o
$(OBJDIR
)/proxusb.o
72 $(CXX
) $(CXXFLAGS
) $^
$(LDLIBS
) -o
$@
75 $(CC
) $(CFLAGS
) -c
-o
$@
$<
78 $(CXX
) $(CXXFLAGS
) -c
-o
$@
$<
80 proxguiqt.moc.
cpp: proxguiqt.h
87 install_kext
: Info.plist
88 mkdir
-p
/System
/Library
/Extensions
/Proxmark3.kext
/Contents
89 cp Info.plist
/System
/Library
/Extensions
/Proxmark3.kext
/Contents
90 chown
-R root
:wheel
/System
/Library
/Extensions
/Proxmark3.kext
91 chmod
755 /System
/Library
/Extensions
/Proxmark3.kext
/System
/Library
/Extensions
/Proxmark3.kext
/Contents
92 chmod
644 /System
/Library
/Extensions
/Proxmark3.kext
/Contents
/Info.plist
93 rm -rf
/System
/Library
/Caches
/com.apple.kext.caches
94 touch
/System
/Library
/Extensions
95 @echo
"*** You may need to reboot for the kext to take effect."