]> git.zerfleddert.de Git - proxmark3-svn/blame - client/Makefile
Split str* and mem* into string.[ch]
[proxmark3-svn] / client / Makefile
CommitLineData
91c38cf7 1CC=gcc
709b784c 2#COMMON_FLAGS = -m32
022c8791 3
7fe9b0b7 4VPATH = ../common
5
a99c6a19 6LDLIBS = -L/opt/local/lib -L/usr/local/lib -lusb -lreadline -lpthread
709b784c 7LDFLAGS = $(COMMON_FLAGS)
535b5a59 8CFLAGS = -std=gnu99 -I. -I../include -I../common -I/opt/local/include -Wall -Wno-unused-function $(COMMON_FLAGS) -g3
6658905f 9
022c8791 10CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall
11QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null)
12
7fe9b0b7 13CMDSRCS = \
91c38cf7 14 crc16.c \
15 iso14443crc.c \
7fe9b0b7 16 data.c \
17 graph.c \
18 ui.c \
19 cmddata.c \
20 cmdhf.c \
21 cmdhf14a.c \
22 cmdhf14b.c \
23 cmdhf15.c \
24 cmdhflegic.c \
25 cmdhw.c \
26 cmdlf.c \
27 cmdlfem4x.c \
28 cmdlfhid.c \
29 cmdlfti.c \
30 cmdparser.c \
31 cmdmain.c
32
33CMDOBJS = $(CMDSRCS:.c=.o)
34
022c8791 35ifeq ($(shell uname),Darwin)
f39c4119 36CXXFLAGS = -I/Library/Frameworks/QtGui.framework/Versions/Current/Headers -I/Library/Frameworks/QtCore.framework/Versions/Current/Headers
37QTLDLIBS = -framework QtGui -framework QtCore
38MOC = moc
022c8791 39endif
f39c4119 40
789d706a 41ifneq ($(QTLDLIBS),)
6658905f 42QTGUI = proxgui.o proxguiqt.o proxguiqt.moc.o
43CFLAGS += -DHAVE_GUI
5ed2c738 44MOC ?= $(shell pkg-config --variable=moc_location QtCore)
6658905f 45LINK.o = $(LINK.cpp)
46else
47QTGUI = guidummy.o
48endif
49
940a2012 50RM = rm -f
51BINS = proxmark3 snooper cli flasher
4cd41f34 52CLEAN = cli cli.exe flasher flasher.exe proxmark3 proxmark3.exe snooper snooper.exe *.o $(CMDOBJS) *.moc.cpp
940a2012 53
54all: $(BINS)
6658905f 55
709b784c 56all-static: LDLIBS:=-static $(LDLIBS)
57all-static: snooper cli flasher
940a2012 58
709b784c 59proxmark3: LDLIBS+=$(QTLDLIBS)
7fe9b0b7 60proxmark3: proxmark3.o $(CMDOBJS) proxusb.o $(QTGUI)
3f030abe 61
7fe9b0b7 62snooper: snooper.o $(CMDOBJS) proxusb.o guidummy.o
6658905f 63
7fe9b0b7 64cli: cli.o $(CMDOBJS) proxusb.o guidummy.o
db917a16 65
7fe9b0b7 66flasher: flash.o flasher.o proxusb.o
06735128 67
6658905f 68proxguiqt.moc.cpp: proxguiqt.h
69 $(MOC) -o$@ $^
70
71clean:
940a2012 72 $(RM) $(CLEAN)
6658905f 73
022c8791 74# must be run as root
75install_kext: Info.plist
76 mkdir -p /System/Library/Extensions/Proxmark3.kext/Contents
77 cp Info.plist /System/Library/Extensions/Proxmark3.kext/Contents
78 chown -R root:wheel /System/Library/Extensions/Proxmark3.kext
79 chmod 755 /System/Library/Extensions/Proxmark3.kext /System/Library/Extensions/Proxmark3.kext/Contents
80 chmod 644 /System/Library/Extensions/Proxmark3.kext/Contents/Info.plist
81 rm -rf /System/Library/Caches/com.apple.kext.caches
82 touch /System/Library/Extensions
83 @echo "*** You may need to reboot for the kext to take effect."
84
6658905f 85.PHONY: all clean
Impressum, Datenschutz