]> cvs.zerfleddert.de Git - proxmark3-svn/blame - client/Makefile
refactor flashing code into flash.h, so we can share it between platforms
[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)
6e4d4ee6 7CFLAGS = -I. -I/opt/local/include -Wall -Wno-unused-function $(COMMON_FLAGS) -g3
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
1e1b3030 13ifeq ($(shell echo ""),)
14
022c8791 15ifeq ($(shell uname),Darwin)
f39c4119 16CXXFLAGS = -I/Library/Frameworks/QtGui.framework/Versions/Current/Headers -I/Library/Frameworks/QtCore.framework/Versions/Current/Headers
17QTLDLIBS = -framework QtGui -framework QtCore
18MOC = moc
022c8791 19endif
f39c4119 20
789d706a 21ifneq ($(QTLDLIBS),)
6658905f 22QTGUI = proxgui.o proxguiqt.o proxguiqt.moc.o
23CFLAGS += -DHAVE_GUI
5ed2c738 24MOC ?= $(shell pkg-config --variable=moc_location QtCore)
6658905f 25LINK.o = $(LINK.cpp)
26else
27QTGUI = guidummy.o
28endif
29
940a2012 30RM = rm -f
31BINS = proxmark3 snooper cli flasher
32CLEAN = cli flasher proxmark3 snooper *.o *.moc.cpp
33else
34RM = del
35BINS = prox.exe
36CLEAN = prox.exe
37endif
38
39all: $(BINS)
6658905f 40
709b784c 41all-static: LDLIBS:=-static $(LDLIBS)
42all-static: snooper cli flasher
43
6e4d4ee6 44prox.exe: prox.c wingui.c command.c flash.c
45 $(WINCC) $(CFLAGS) $(DEFINES) -o prox.exe prox.c wingui.c command.c flash.c $(WINLIBS)
940a2012 46
709b784c 47proxmark3: LDLIBS+=$(QTLDLIBS)
6658905f 48proxmark3: proxmark3.o gui.o command.o usb.o $(QTGUI)
49
a99c6a19 50command.o: command.c
3f030abe 51
6658905f 52snooper: snooper.o gui.o command.o usb.o guidummy.o
53
db917a16 54cli: cli.o gui.o command.o usb.o guidummy.o
55
6e4d4ee6 56flasher: flash.o flasher.o usb.o
06735128 57
6658905f 58proxguiqt.moc.cpp: proxguiqt.h
59 $(MOC) -o$@ $^
60
61clean:
940a2012 62 $(RM) $(CLEAN)
6658905f 63
022c8791 64# must be run as root
65install_kext: Info.plist
66 mkdir -p /System/Library/Extensions/Proxmark3.kext/Contents
67 cp Info.plist /System/Library/Extensions/Proxmark3.kext/Contents
68 chown -R root:wheel /System/Library/Extensions/Proxmark3.kext
69 chmod 755 /System/Library/Extensions/Proxmark3.kext /System/Library/Extensions/Proxmark3.kext/Contents
70 chmod 644 /System/Library/Extensions/Proxmark3.kext/Contents/Info.plist
71 rm -rf /System/Library/Caches/com.apple.kext.caches
72 touch /System/Library/Extensions
73 @echo "*** You may need to reboot for the kext to take effect."
74
6658905f 75.PHONY: all clean
Impressum, Datenschutz