Merge pull request #107 from p-l-/fix-hfmf
[legacy-proxmark3.git] / client / hid-flasher / Makefile
blob5e9b6fcde6efe4b1a0e97fa8a44c7e68e9972048
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
8 CC=gcc
9 CXX=g++
10 #COMMON_FLAGS = -m32
12 VPATH = ../../common
13 OBJDIR = obj
15 LDLIBS = -L/opt/local/lib -L/usr/local/lib -lusb -lreadline -lpthread
16 LDFLAGS = $(COMMON_FLAGS)
17 CFLAGS = -std=gnu99 -I. -I../include -I../common -I/opt/local/include -Wall -Wno-unused-function $(COMMON_FLAGS) -g -O3
19 CXXFLAGS =
20 QTLDLIBS =
22 RM = rm -f
23 BINS = flasher
24 CLEAN = flasher flasher.exe $(OBJDIR)/*.o *.o
26 all: $(BINS)
28 flasher: $(OBJDIR)/flash.o $(OBJDIR)/flasher.o $(OBJDIR)/proxusb.o
29 $(CXX) $(CXXFLAGS) $^ $(LDLIBS) -o $@
31 $(OBJDIR)/%.o: %.c
32 $(CC) $(CFLAGS) -c -o $@ $<
34 clean:
35 $(RM) $(CLEAN)
37 # must be run as root
38 install_kext: Info.plist
39 mkdir -p /System/Library/Extensions/Proxmark3.kext/Contents
40 cp Info.plist /System/Library/Extensions/Proxmark3.kext/Contents
41 chown -R root:wheel /System/Library/Extensions/Proxmark3.kext
42 chmod 755 /System/Library/Extensions/Proxmark3.kext /System/Library/Extensions/Proxmark3.kext/Contents
43 chmod 644 /System/Library/Extensions/Proxmark3.kext/Contents/Info.plist
44 rm -rf /System/Library/Caches/com.apple.kext.caches
45 touch /System/Library/Extensions
46 @echo "*** You may need to reboot for the kext to take effect."
48 .PHONY: all clean