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