]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/Makefile
Merge branch 'master' into master
[proxmark3-svn] / client / Makefile
index 2d256b72e46a53e8650c144228a005d798e48db4..90b1683081b62d27005fbe3d75ac05a1be3c38ba 100644 (file)
@@ -19,13 +19,20 @@ OBJDIR = obj
 
 LDLIBS = -L/opt/local/lib -L/usr/local/lib -lreadline -lpthread -lm
 LUALIB = ../liblua/liblua.a
 
 LDLIBS = -L/opt/local/lib -L/usr/local/lib -lreadline -lpthread -lm
 LUALIB = ../liblua/liblua.a
+JANSSONLIBPATH = ./jansson
+JANSSONLIB = $(JANSSONLIBPATH)/libjansson.a
 LDFLAGS = $(ENV_LDFLAGS)
 LDFLAGS = $(ENV_LDFLAGS)
-CFLAGS = $(ENV_CFLAGS) -std=c99 -D_ISOC99_SOURCE -I. -I../include -I../common -I../common/polarssl -I../zlib -I../uart -I/opt/local/include -I../liblua -Wall -g -O3
+CFLAGS = $(ENV_CFLAGS) -std=c99 -D_ISOC99_SOURCE -I. -I../include -I../common -I../common/polarssl -I../zlib -I../uart -I/opt/local/include -I../liblua -I$(JANSSONLIBPATH) -Wall -g -O3
 CXXFLAGS = -I../include -Wall -O3
 
 APP_CFLAGS =
 include ../common/Makefile_Enabled_Options.common
 CFLAGS += $(APP_CFLAGS)
 CXXFLAGS = -I../include -Wall -O3
 
 APP_CFLAGS =
 include ../common/Makefile_Enabled_Options.common
 CFLAGS += $(APP_CFLAGS)
+ifneq (,$(findstring WITH_SMARTCARD,$(APP_CFLAGS)))
+       SRC_SMARTCARD = cmdsmartcard.c
+else
+       SRC_SMARTCARD = 
+endif
 
 LUAPLATFORM = generic
 platform = $(shell uname)
 
 LUAPLATFORM = generic
 platform = $(shell uname)
@@ -93,13 +100,16 @@ CORESRCS =         uart_posix.c \
                        ui.c \
                        comms.c
 
                        ui.c \
                        comms.c
 
-CMDSRCS =      crapto1/crapto1.c\
+CMDSRCS =      $(SRC_SMARTCARD) \
+                       crapto1/crapto1.c\
                        crapto1/crypto1.c\
                        polarssl/des.c \
                        polarssl/aes.c\
                        polarssl/bignum.c\
                        polarssl/rsa.c\
                        polarssl/sha1.c\
                        crapto1/crypto1.c\
                        polarssl/des.c \
                        polarssl/aes.c\
                        polarssl/bignum.c\
                        polarssl/rsa.c\
                        polarssl/sha1.c\
+                       cliparser/argtable3.c\
+                       cliparser/cliparser.c\
                        mfkey.c\
                        loclass/cipher.c \
                        loclass/cipherutils.c \
                        mfkey.c\
                        loclass/cipher.c \
                        loclass/cipherutils.c \
@@ -154,6 +164,8 @@ CMDSRCS =   crapto1/crapto1.c\
                        cmdlfem4x.c \
                        cmdlffdx.c \
                        cmdlfgproxii.c \
                        cmdlfem4x.c \
                        cmdlffdx.c \
                        cmdlfgproxii.c \
+                       hidcardformatutils.c\
+                       hidcardformats.c\
                        cmdlfhid.c \
                        cmdlfhitag.c \
                        cmdlfio.c \
                        cmdlfhid.c \
                        cmdlfhitag.c \
                        cmdlfio.c \
@@ -226,12 +238,12 @@ WINBINS = $(patsubst %, %.exe, $(BINS))
 CLEAN = $(BINS) $(WINBINS) $(COREOBJS) $(CMDOBJS) $(ZLIBOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) $(OBJDIR)/*.o *.moc.cpp ui/ui_overlays.h
 
 # need to assign dependancies to build these first...
 CLEAN = $(BINS) $(WINBINS) $(COREOBJS) $(CMDOBJS) $(ZLIBOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) $(OBJDIR)/*.o *.moc.cpp ui/ui_overlays.h
 
 # need to assign dependancies to build these first...
-all: lua_build $(BINS)
+all: lua_build jansson_build $(BINS)
 
 all-static: LDLIBS:=-static $(LDLIBS)
 all-static: proxmark3 flasher fpga_compress
 
 
 all-static: LDLIBS:=-static $(LDLIBS)
 all-static: proxmark3 flasher fpga_compress
 
-proxmark3: LDLIBS+=$(LUALIB) $(QTLDLIBS)
+proxmark3: LDLIBS+=$(LUALIB) $(JANSSONLIB) $(QTLDLIBS)
 proxmark3: $(OBJDIR)/proxmark3.o $(COREOBJS) $(CMDOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) $(ZLIBOBJS) lualibs/usb_cmd.lua
        $(LD) $(LDFLAGS) $(OBJDIR)/proxmark3.o $(COREOBJS) $(CMDOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) $(ZLIBOBJS) $(LDLIBS) -o $@
 
 proxmark3: $(OBJDIR)/proxmark3.o $(COREOBJS) $(CMDOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) $(ZLIBOBJS) lualibs/usb_cmd.lua
        $(LD) $(LDFLAGS) $(OBJDIR)/proxmark3.o $(COREOBJS) $(CMDOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) $(ZLIBOBJS) $(LDLIBS) -o $@
 
@@ -255,6 +267,7 @@ lualibs/usb_cmd.lua: ../include/usb_cmd.h
 clean:
        $(RM) $(CLEAN)
        cd ../liblua && make clean
 clean:
        $(RM) $(CLEAN)
        cd ../liblua && make clean
+       cd ./jansson && make clean
 
 tarbin: $(BINS)
        $(TAR) $(TARFLAGS) ../proxmark3-$(platform)-bin.tar $(BINS:%=client/%) $(WINBINS:%=client/%)
 
 tarbin: $(BINS)
        $(TAR) $(TARFLAGS) ../proxmark3-$(platform)-bin.tar $(BINS:%=client/%) $(WINBINS:%=client/%)
@@ -262,6 +275,10 @@ tarbin: $(BINS)
 lua_build:
        @echo Compiling liblua, using platform $(LUAPLATFORM)
        cd ../liblua && make $(LUAPLATFORM)
 lua_build:
        @echo Compiling liblua, using platform $(LUAPLATFORM)
        cd ../liblua && make $(LUAPLATFORM)
+       
+jansson_build:
+       @echo Compiling jansson
+       cd ./jansson && make all
 
 .PHONY: all clean
 
 
 .PHONY: all clean
 
@@ -310,9 +327,7 @@ DEPENDENCY_FILES = $(patsubst %.c, $(OBJDIR)/%.d, $(CORESRCS) $(CMDSRCS) $(ZLIBS
        $(patsubst %.cpp, $(OBJDIR)/%.d, $(QTGUISRCS)) \
        $(OBJDIR)/proxmark3.d $(OBJDIR)/flash.d $(OBJDIR)/flasher.d $(OBJDIR)/fpga_compress.d
 
        $(patsubst %.cpp, $(OBJDIR)/%.d, $(QTGUISRCS)) \
        $(OBJDIR)/proxmark3.d $(OBJDIR)/flash.d $(OBJDIR)/flasher.d $(OBJDIR)/fpga_compress.d
 
-
 $(DEPENDENCY_FILES): ;
 .PRECIOUS: $(DEPENDENCY_FILES)
 
 -include $(DEPENDENCY_FILES)
 $(DEPENDENCY_FILES): ;
 .PRECIOUS: $(DEPENDENCY_FILES)
 
 -include $(DEPENDENCY_FILES)
-
Impressum, Datenschutz