]> cvs.zerfleddert.de Git - proxmark3-svn/blame - client/Makefile
mifare tools update
[proxmark3-svn] / client / Makefile
CommitLineData
940a2012 1WINCC=c:\mingw\bin\gcc
2
709b784c 3#COMMON_FLAGS = -m32
022c8791 4
a99c6a19 5LDLIBS = -L/opt/local/lib -L/usr/local/lib -lusb -lreadline -lpthread
709b784c 6LDFLAGS = $(COMMON_FLAGS)
7CFLAGS = -I. -I/opt/local/include -Wall -Wno-unused-function $(COMMON_FLAGS)
6658905f 8
940a2012 9WINLIBS = -lgdi32 -lsetupapi
022c8791 10CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall
11QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null)
12
13ifeq ($(shell uname),Darwin)
249deb42 14CXXFLAGS += -DQ_WS_MAC32
15CFLAGS +=
16QTLDLIBS +=
022c8791 17endif
249deb42 18QTLDLIBS=
789d706a 19ifneq ($(QTLDLIBS),)
6658905f 20QTGUI = proxgui.o proxguiqt.o proxguiqt.moc.o
21CFLAGS += -DHAVE_GUI
5ed2c738 22MOC ?= $(shell pkg-config --variable=moc_location QtCore)
6658905f 23LINK.o = $(LINK.cpp)
24else
25QTGUI = guidummy.o
26endif
27
940a2012 28ifeq ($(shell echo ""),)
29RM = rm -f
30BINS = proxmark3 snooper cli flasher
31CLEAN = cli flasher proxmark3 snooper *.o *.moc.cpp
32else
33RM = del
34BINS = prox.exe
35CLEAN = prox.exe
36endif
37
38all: $(BINS)
6658905f 39
709b784c 40all-static: LDLIBS:=-static $(LDLIBS)
41all-static: snooper cli flasher
42
940a2012 43prox.exe: prox.c wingui.c command.c
44 $(WINCC) $(CFLAGS) $(DEFINES) -o prox.exe prox.c wingui.c command.c $(WINLIBS)
45
709b784c 46proxmark3: LDLIBS+=$(QTLDLIBS)
6658905f 47proxmark3: proxmark3.o gui.o command.o usb.o $(QTGUI)
48
a99c6a19 49command.o: command.c
3f030abe 50
6658905f 51snooper: snooper.o gui.o command.o usb.o guidummy.o
52
db917a16 53cli: cli.o gui.o command.o usb.o guidummy.o
54
06735128 55flasher: flasher.o usb.o
56
6658905f 57proxguiqt.moc.cpp: proxguiqt.h
58 $(MOC) -o$@ $^
59
60clean:
940a2012 61 $(RM) $(CLEAN)
6658905f 62
022c8791 63# must be run as root
64install_kext: Info.plist
65 mkdir -p /System/Library/Extensions/Proxmark3.kext/Contents
66 cp Info.plist /System/Library/Extensions/Proxmark3.kext/Contents
67 chown -R root:wheel /System/Library/Extensions/Proxmark3.kext
68 chmod 755 /System/Library/Extensions/Proxmark3.kext /System/Library/Extensions/Proxmark3.kext/Contents
69 chmod 644 /System/Library/Extensions/Proxmark3.kext/Contents/Info.plist
70 rm -rf /System/Library/Caches/com.apple.kext.caches
71 touch /System/Library/Extensions
72 @echo "*** You may need to reboot for the kext to take effect."
73
6658905f 74.PHONY: all clean
Impressum, Datenschutz