]>
Commit | Line | Data |
---|---|---|
e9281ae8 JH |
1 | #----------------------------------------------------------------------------- |
2 | # This code is licensed to you under the terms of the GNU GPL, version 2 or, | |
3 | # at your option, any later version. See the LICENSE.txt file for the text of | |
4 | # the license. | |
5 | #----------------------------------------------------------------------------- | |
6 | include ../../common/Makefile.common | |
7 | ||
8 | CC=gcc | |
9 | CXX=g++ | |
10 | #COMMON_FLAGS = -m32 | |
11 | ||
12 | VPATH = ../../common | |
13 | OBJDIR = obj | |
14 | ||
360a5b1b | 15 | ifeq ($(platform),Darwin) |
16 | LDLIBS = -L/opt/local/lib -L/usr/local/lib -lusb-1.0 -lreadline -lpthread | |
17 | CFLAGS = -std=gnu99 -I. -I../include -I../common -I/usr/local/include -I/opt/local/include -Wall -Wno-unused-function $(COMMON_FLAGS) -g -O3 | |
18 | else | |
19 | LDLIBS = -L/opt/local/lib -L/usr/local/lib -lusb -lreadline -lpthread | |
20 | CFLAGS = -std=gnu99 -I. -I../include -I../common -I/opt/local/include -Wall -Wno-unused-function $(COMMON_FLAGS) -g -O3 | |
21 | endif | |
e9281ae8 | 22 | |
360a5b1b | 23 | LDFLAGS = $(COMMON_FLAGS) |
e9281ae8 JH |
24 | CXXFLAGS = |
25 | QTLDLIBS = | |
26 | ||
27 | RM = rm -f | |
28 | BINS = flasher | |
29 | CLEAN = flasher flasher.exe $(OBJDIR)/*.o *.o | |
30 | ||
31 | all: $(BINS) | |
32 | ||
33 | flasher: $(OBJDIR)/flash.o $(OBJDIR)/flasher.o $(OBJDIR)/proxusb.o | |
34 | $(CXX) $(CXXFLAGS) $^ $(LDLIBS) -o $@ | |
35 | ||
36 | $(OBJDIR)/%.o: %.c | |
37 | $(CC) $(CFLAGS) -c -o $@ $< | |
38 | ||
39 | clean: | |
40 | $(RM) $(CLEAN) | |
41 | ||
42 | # must be run as root | |
43 | install_kext: Info.plist | |
44 | mkdir -p /System/Library/Extensions/Proxmark3.kext/Contents | |
45 | cp Info.plist /System/Library/Extensions/Proxmark3.kext/Contents | |
46 | chown -R root:wheel /System/Library/Extensions/Proxmark3.kext | |
47 | chmod 755 /System/Library/Extensions/Proxmark3.kext /System/Library/Extensions/Proxmark3.kext/Contents | |
48 | chmod 644 /System/Library/Extensions/Proxmark3.kext/Contents/Info.plist | |
49 | rm -rf /System/Library/Caches/com.apple.kext.caches | |
50 | touch /System/Library/Extensions | |
51 | @echo "*** You may need to reboot for the kext to take effect." | |
52 | ||
53 | .PHONY: all clean |