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
5 #-----------------------------------------------------------------------------
8 -include ..
/Makefile.platform
9 -include ..
/.Makefile.options.cache
10 ifneq ($(PLATFORM
), $(CACHED_PLATFORM
))
11 $(error platform definitions have been changed
, please
"make clean" at the root of the project
)
14 include ..
/Makefile.defs
16 ifeq ($(PLATFORM
),PM3ICOPYX
)
20 INSTALLBIN
= proxmark3
21 INSTALLSHARE
= cmdscripts lualibs luascripts pyscripts resources dictionaries
24 vpath
%.dic dictionaries
28 INCLUDES
+= -I
$(BREW_PREFIX
)/include
29 LDLIBS
+= -L
$(BREW_PREFIX
)/lib
30 PKG_CONFIG_ENV
:= PKG_CONFIG_PATH
=$(BREW_PREFIX
)/opt
/qt
/lib
/pkgconfig
31 PKG_CONFIG_ENV
:= PKG_CONFIG_PATH
=$(BREW_PREFIX
)/opt
/qt5
/lib
/pkgconfig
34 ifdef ($(USE_MACPORTS
),1)
35 INCLUDES
+= -I
$(MACPORTS_PREFIX
)/include
36 LDLIBS
+= -L
$(MACPORTS_PREFIX
)/lib
37 PKG_CONFIG_ENV
:= PKG_CONFIG_PATH
=$(MACPORTS_PREFIX
)/lib
/pkgconfig
48 AMIIBOLIBPATH
= .
/deps
/amiitool
49 AMIIBOLIBINC
= -I
$(AMIIBOLIBPATH
)
50 AMIIBOLIB
= $(AMIIBOLIBPATH
)/libamiibo.a
53 ## Cliparser / Argtable3
54 CLIPARSERLIBPATH
= .
/deps
/cliparser
55 CLIPARSERLIBINC
= -I
$(CLIPARSERLIBPATH
)
56 CLIPARSERLIB
= $(CLIPARSERLIBPATH
)/libcliparser.a
60 HARDNESTEDLIBPATH
= .
/deps
/hardnested
61 HARDNESTEDLIBINC
= -I
$(HARDNESTEDLIBPATH
)
62 HARDNESTEDLIB
= $(HARDNESTEDLIBPATH
)/libhardnested.a
66 JANSSONLIBPATH
= .
/deps
/jansson
67 JANSSONLIBINC
= -I
$(JANSSONLIBPATH
)
68 JANSSONLIB
= $(JANSSONLIBPATH
)/libjansson.a
72 LUALIBPATH
= .
/deps
/liblua
73 LUALIBINC
= -I
$(LUALIBPATH
)
74 LUALIB
= $(LUALIBPATH
)/liblua.a
77 ifneq (,$(findstring MINGW
,$(platform
)))
80 ifeq ($(platform
),Darwin
)
89 REVENGLIBPATH
= .
/deps
/reveng
90 REVENGLIBINC
= -I
$(REVENGLIBPATH
)
91 REVENGLIB
= $(REVENGLIBPATH
)/libreveng.a
95 TINYCBORLIBPATH
= .
/deps
/tinycbor
96 TINYCBORLIBINC
= -I
$(TINYCBORLIBPATH
)
97 TINYCBORLIB
= $(TINYCBORLIBPATH
)/tinycbor.a
101 WHEREAMILIBPATH
= .
/deps
/whereami
102 WHEREAMILIBINC
= -I
$(WHEREAMILIBPATH
)
103 WHEREAMILIB
= $(WHEREAMILIBPATH
)/libwhereami.a
106 ##########################
107 # common local libraries #
108 ##########################
111 MBEDTLSLIBPATH
= ..
/common
/mbedtls
112 MBEDTLSLIBINC
= -I
$(MBEDTLSLIBPATH
)
113 MBEDTLSLIB
= $(OBJDIR
)/libmbedtls.a
114 MBEDTLSLIBCLIENTRELPATH
= ..
/..
/client
116 ########################################################
117 # optional system libraries to replace local libraries #
118 ########################################################
121 # not distributed as system library
122 STATICLIBS
+= $(AMIIBOLIB
)
123 LDLIBS
+= $(AMIIBOLIBLD
)
124 PM3INCLUDES
+= $(AMIIBOLIBINC
)
126 ## Cliparser / Argtable3
127 # not distributed as system library
128 STATICLIBS
+= $(CLIPARSERLIB
)
129 LDLIBS
+= $(CLIPARSERLIBLD
)
130 PM3INCLUDES
+= $(CLIPARSERLIBINC
)
133 # not distributed as system library
134 STATICLIBS
+= $(HARDNESTEDLIB
)
135 LDLIBS
+=$(HARDNESTEDLIBLD
)
136 PM3INCLUDES
+= $(HARDNESTEDLIBINC
)
139 ifneq ($(SKIPLUASYSTEM
),1)
140 ifdef MACPORTS_PREFIX
141 LUAINCLUDES
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--cflags lua-5.2
2>/dev
/null
)
142 LUALDLIBS
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--libs lua-5.2
2>/dev
/null
)
144 LUAINCLUDES
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--cflags lua5.2
2>/dev
/null
)
145 LUALDLIBS
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--libs lua5.2
2>/dev
/null
)
147 ifneq ($(LUALDLIBS
),)
149 LUALIBLD
= $(LUALDLIBS
)
150 LUALIBINC
= $(LUAINCLUDES
)
154 STATICLIBS
+= $(LUALIB
)
155 LDLIBS
+= $(LUALIBLD
)
156 PM3INCLUDES
+= $(LUALIBINC
)
159 # Jansson section needs to be after Lua to avoid interferences on macOS if a locally incompatible Lua was available, see PR 1155
160 ifneq ($(SKIPJANSSONSYSTEM
),1)
161 JANSSONINCLUDES
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--cflags jansson
2>/dev
/null
)
162 JANSSONLDLIBS
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--libs jansson
2>/dev
/null
)
163 ifneq ($(JANSSONLDLIBS
),)
165 JANSSONLIBLD
= $(JANSSONLDLIBS
)
166 JANSSONLIBINC
= $(JANSSONINCLUDES
)
170 STATICLIBS
+= $(JANSSONLIB
)
171 LDLIBS
+= $(JANSSONLIBLD
)
172 PM3INCLUDES
+= $(JANSSONLIBINC
)
175 # system library cannot be used because it is compiled by default without CMAC support
176 STATICLIBS
+= $(MBEDTLSLIB
)
177 LDLIBS
+= $(MBEDTLSLIBLD
)
178 PM3INCLUDES
+= $(MBEDTLSLIBINC
)
181 # not distributed as system library
182 STATICLIBS
+= $(REVENGLIB
)
183 LDLIBS
+= $(REVENGLIBLD
)
184 PM3INCLUDES
+= $(REVENGLIBINC
)
187 # not distributed as system library
188 STATICLIBS
+= $(TINYCBORLIB
)
189 LDLIBS
+= $(TINYCBORLIBLD
)
190 PM3INCLUDES
+= $(TINYCBORLIBINC
)
193 ifneq ($(SKIPWHEREAMISYSTEM
),1)
194 ifneq (,$(wildcard /usr
/include/whereami.h
))
196 WHEREAMILIBLD
= -lwhereami
201 STATICLIBS
+= $(WHEREAMILIB
)
202 LDLIBS
+= $(WHEREAMILIBLD
)
203 PM3INCLUDES
+= $(WHEREAMILIBINC
)
210 # RPi Zero gcc requires -latomic
211 # but MacOSX /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
212 # doesn't recognize option --as-needed
213 ifneq ($(platform
),Darwin
)
214 LDLIBS
+= -Wl
,--as-needed
-latomic
-Wl
,--no-as-needed
222 BTINCLUDES
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--cflags bluez
2>/dev
/null
)
223 BTLDLIBS
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--libs bluez
2>/dev
/null
)
225 BTLIBLD
= $(BTLDLIBS
)
226 BTLIBINC
= $(BTINCLUDES
)
231 PM3INCLUDES
+= $(BTLIBINC
)
237 # Some have no pthread, e.g. termux
238 ifneq ($(SKIPPTHREAD
),1)
242 ## Python3 (optional)
243 ifneq ($(SKIPPYTHON
),1)
244 PYTHONINCLUDES
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--cflags python3
2>/dev
/null
)
245 PYTHONLDLIBS
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--libs python3
2>/dev
/null
)
246 ifneq ($(PYTHONLDLIBS
),)
247 PYTHONLIBLD
= $(PYTHONLDLIBS
)
248 PYTHONLIBINC
= $(PYTHONINCLUDES
)
251 # since python3.8, applications willing to embed python must use -embed:
252 PYTHONINCLUDES
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--cflags python3-embed
2>/dev
/null
)
253 PYTHONLDLIBS
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--libs python3-embed
2>/dev
/null
)
254 ifneq ($(PYTHONLDLIBS
),)
255 PYTHONLIBLD
= $(PYTHONLDLIBS
)
256 PYTHONLIBINC
= $(PYTHONINCLUDES
)
261 LDLIBS
+= $(PYTHONLIBLD
)
262 PM3INCLUDES
+= $(PYTHONLIBINC
)
264 ## QT5 (or QT4 fallback) (optional)
266 # Check for correctly configured Qt5
267 QTINCLUDES
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--cflags Qt5Core Qt5Widgets
2>/dev
/null
)
268 QTLDLIBS
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--libs Qt5Core Qt5Widgets
2>/dev
/null
)
269 MOC
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--variable
=host_bins Qt5Core
)/moc
270 UIC
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--variable
=host_bins Qt5Core
)/uic
274 # if Qt5 not found check for correctly configured Qt4
275 QTINCLUDES
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--cflags QtCore QtGui
2>/dev
/null
)
276 QTLDLIBS
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--libs QtCore QtGui
2>/dev
/null
)
277 MOC
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--variable
=moc_location QtCore
)
278 UIC
= $(shell $(PKG_CONFIG_ENV
) pkg-config
--variable
=uic_location QtCore
)
281 # if both pkg-config commands failed, search in common places
283 ifneq ($(wildcard $(QTDIR
)/include/QtWidgets
),)
285 QTINCLUDES
= -I
$(QTDIR
)/include -I
$(QTDIR
)/include/QtCore
-I
$(QTDIR
)/include/QtGui
-I
$(QTDIR
)/include/QtWidgets
286 QTLDLIBS
= -L
$(QTDIR
)/lib
-lQt5Core
-lQt5Gui
-lQt5Widgets
290 QTINCLUDES
= -I
$(QTDIR
)/include -I
$(QTDIR
)/include/QtCore
-I
$(QTDIR
)/include/QtGui
291 QTLDLIBS
= -L
$(QTDIR
)/lib
-lQtCore4
-lQtGui4
293 MOC
= $(QTDIR
)/bin
/moc
294 UIC
= $(QTDIR
)/bin
/uic
301 LDLIBS
+= $(QTLDLIBS
)
302 CXXINCLUDES
+= $(QTINCLUDES
)
305 ifneq ($(SKIPREADLINE
),1)
307 LDLIBS
+= -L
$(BREW_PREFIX
)/opt
/readline
/lib
308 PM3INCLUDES
+= -I
$(BREW_PREFIX
)/opt
/readline
/include
311 ifeq ($(USE_MACPORTS
),1)
312 PM3INCLUDES
+= -I
$(MACPORTS_PREFIX
)/include/readline
323 ifneq ("$(wildcard src/pm3_luawrap.c)","")
326 ifeq ($(PYTHON_FOUND
),1)
327 ifneq ("$(wildcard src/pm3_pywrap.c)","")
328 SWIG_PYTHON_FOUND
= 1
332 #######################################################################################################
333 CFLAGS ?
= $(DEFCFLAGS
)
334 # We cannot just use CFLAGS+=... because it has impact on sub-makes if CFLAGS is defined in env:
335 PM3CFLAGS
= $(CFLAGS
)
336 PM3CFLAGS
+= -I.
/src
-I.
/include -I..
/include -I..
/common
-I..
/common_fpga
$(PM3INCLUDES
) $(INCLUDES
)
338 #PM3CFLAGS += -std=c11 -pedantic
341 ifneq (,$(findstring MINGW
,$(platform
)))
342 # Mingw uses by default Microsoft printf, we want the GNU printf (e.g. for %z)
343 # and setting _ISOC99_SOURCE sets internally __USE_MINGW_ANSI_STDIO=1
344 # FTR __USE_MINGW_ANSI_STDIO seems deprecated in Mingw32
345 # but not Mingw64 https://fr.osdn.net/projects/mingw/lists/archive/users/2019-January/000199.html
346 PM3CFLAGS
+= -D_ISOC99_SOURCE
347 PM3CFLAGS
+= -mno-ms-bitfields
-fexec-charset
=cp850
350 ifeq ($(READLINE_FOUND
),1)
351 PM3CFLAGS
+= -DHAVE_READLINE
355 PM3CFLAGS
+= -DHAVE_BLUEZ
358 ifeq ($(PYTHON_FOUND
),1)
359 PM3CFLAGS
+= -DHAVE_PYTHON
362 ifeq ($(SWIG_LUA_FOUND
),1)
363 PM3CFLAGS
+= -DHAVE_LUA_SWIG
365 ifeq ($(SWIG_PYTHON_FOUND
),1)
366 PM3CFLAGS
+= -DHAVE_PYTHON_SWIG
369 CXXFLAGS ?
= -Wall
-O3
370 PM3CXXFLAGS
= $(CXXFLAGS
)
371 PM3CXXFLAGS
+= -I..
/include -I.
/include
374 PM3CFLAGS
+= -DHAVE_GUI
375 PM3CXXFLAGS
+= -DQT_NO_DEBUG
376 ifeq ($(QT5_FOUND
),1)
377 # On OSX Qt5 is claiming for a C++11 compiler (gnu++14 works too, but if nothing it fails)
378 PM3CXXFLAGS
+= -fPIC
-std
=c
++11
382 LDFLAGS ?
= $(DEFLDFLAGS
)
383 PM3LDFLAGS
= $(LDFLAGS
)
384 ifeq ($(platform
),Darwin
)
385 PM3LDFLAGS
+= -framework Foundation
-framework AppKit
392 $(info ===================================================================)
393 $(info Version
info: $(shell ..
/tools
/mkversion.sh
--short
2>/dev
/null
))
394 $(info Client platform
: $(platform
))
397 $(info GUI support
: skipped
)
400 ifeq ($(QT5_FOUND
),1)
401 $(info GUI support
: QT5 found
, enabled
($(shell QT_SELECT
=5 qmake
-v
2>/dev
/null|grep
-o
'Qt version.*')))
403 $(info GUI support
: QT4 found
, enabled
($(shell QT_SELECT
=4 qmake
-v
2>/dev
/null|grep
-o
'Qt version.*')))
406 $(info GUI support
: QT not found
, disabled
)
411 $(info native BT support
: skipped
)
414 $(info native BT support
: Bluez found
, enabled
)
416 $(info native BT support
: Bluez not found
, disabled
)
420 ifeq ($(SKIPJANSSONSYSTEM
),1)
421 $(info Jansson library
: local library forced
)
422 else ifeq ($(JANSSON_FOUND
),1)
423 $(info Jansson library
: system library found
)
425 $(info Jansson library
: system library not found
, using local library
)
428 ifeq ($(SKIPLUASYSTEM
),1)
429 $(info Lua library
: local library forced
)
431 ifeq ($(LUA_FOUND
),1)
432 $(info Lua library
: system library found
)
434 $(info Lua library
: system library not found
, using local library
)
438 ifeq ($(SKIPPYTHON
),1)
439 $(info Python3 library
: skipped
)
441 ifeq ($(PYTHON_FOUND
),1)
442 $(info Python3 library
: Python3 v
$(shell pkg-config
--modversion python3
) found
, enabled
)
444 $(info Python3 library
: Python3 not found
, disabled
)
448 ifeq ($(SKIPREADLINE
),1)
449 $(info Readline library
: skipped
)
451 ifeq ($(READLINE_FOUND
),1)
452 $(info Readline library
: enabled
)
454 $(info Readline library
: Readline not found
, disabled
)
458 ifeq ($(SKIPWHEREAMISYSTEM
),1)
459 $(info Whereami library
: local library forced
)
461 ifeq ($(WHEREAMI_FOUND
),1)
462 $(info Whereami library
: system library found
)
464 $(info Whereami library
: system library not found
, using local library
)
468 ifeq ($(SWIG_LUA_FOUND
),1)
469 $(info Lua SWIG
: wrapper found
)
471 ifeq ($(SWIG_PYTHON_FOUND
),1)
472 $(info Python SWIG
: wrapper found
)
475 $(info compiler version
: $(shell $(CC
) --version|head
-n
1))
476 $(info ===================================================================)
482 # Flags to generate temporary dependency files
483 DEPFLAGS
= -MT
$@
-MMD
-MP
-MF
$(OBJDIR
)/$*.Td
484 # make temporary to final dependency files after successful compilation
485 POSTCOMPILE
= $(MV
) -f
$(OBJDIR
)/$*.Td
$(OBJDIR
)/$*.d
&& $(TOUCH
) $@
491 SRCS
= mifare
/aiddesfire.c \
497 cmdflashmemspiffs.c \
572 emv
/crypto_polarssl.c\
582 emv
/test/crypto_test.c\
583 emv
/test/cryptotest.c\
587 fido
/additional_ca.c \
591 cipurse
/cipursecore.c \
592 cipurse
/cipursecrypto.c \
593 cipurse
/cipursetest.c \
600 iso7816
/iso7816core.c \
602 loclass
/cipherutils.c \
603 loclass
/elite_crack.c \
606 mifare
/desfirecrypto.c \
607 mifare
/desfirecore.c \
608 mifare
/desfiresecurechan.c \
609 mifare
/desfiretest.c \
613 mifare
/mifaredefault.c \
614 mifare
/mifarehost.c \
631 wiegand_formatutils.c
634 SRCS
+= bucketsort.c \
652 ifeq ($(SWIG_LUA_FOUND
),1)
653 SWIGSRCS
+= pm3_luawrap.c
655 ifeq ($(SWIG_PYTHON_FOUND
),1)
656 SWIGSRCS
+= pm3_pywrap.c
661 CXXSRCS
= proxgui.
cpp proxguiqt.
cpp proxguiqt.moc.
cpp
663 CXXSRCS
= guidummy.
cpp
667 ifeq ($(platform
),Darwin
)
668 OBJCSRCS
= util_darwin.m
671 OBJS
= $(SRCS
:%.c
=$(OBJDIR
)/%.o
)
672 OBJS
+= $(SWIGSRCS
:%.c
=$(OBJDIR
)/%.o
)
673 OBJS
+= $(CXXSRCS
:%.
cpp=$(OBJDIR
)/%.o
)
674 OBJS
+= $(OBJCSRCS
:%.m
=$(OBJDIR
)/%.o
)
678 CLEAN
= $(BINS
) src
/version_pm3.c src
/*.moc.
cpp src
/ui
/ui_overlays.h src
/ui
/ui_image.h lualibs
/pm3_cmd.lua lualibs
/mfc_default_keys.lua
679 # transition: cleaning also old path stuff
680 CLEAN
+= flasher
*.moc.
cpp ui
/ui_overlays.h ui
/ui_image.h
686 # need to assign dependancies to build these first...
689 all-static
: LDLIBS
:=-static
$(LDLIBS
)
692 proxmark3
: $(OBJS
) $(STATICLIBS
) lualibs
/pm3_cmd.lua lualibs
/mfc_default_keys.lua
694 $(Q
)$(LD
) $(PM3LDFLAGS
) $(OBJS
) $(STATICLIBS
) $(LDLIBS
) -o
$@
696 src
/proxgui.
cpp: src
/ui
/ui_overlays.h src
/ui
/ui_image.h
698 src
/proxguiqt.moc.
cpp: src
/proxguiqt.h
702 src
/ui
/ui_overlays.h
: src
/ui
/overlays.ui
706 src
/ui
/ui_image.h
: src
/ui
/image.ui
710 lualibs
/pm3_cmd.lua
: ..
/include/pm3_cmd.h
712 $(Q
)awk
-f pm3_cmd_h2lua.awk
$^
> $@
714 lualibs
/mfc_default_keys.lua
: mfc_default_keys.dic
716 $(Q
)awk
-f default_keys_dic2lua.awk
$^
> $@
720 $(Q
)$(RMDIR
) $(OBJDIR
)
721 $(Q
)$(MAKE
) --no-print-directory
-C
$(AMIIBOLIBPATH
) clean
722 $(Q
)$(MAKE
) --no-print-directory
-C
$(CLIPARSERLIBPATH
) clean
723 $(Q
)$(MAKE
) --no-print-directory
-C
$(HARDNESTEDLIBPATH
) clean
724 $(Q
)$(MAKE
) --no-print-directory
-C
$(JANSSONLIBPATH
) clean
725 $(Q
)$(MAKE
) --no-print-directory
-C
$(LUALIBPATH
) clean
726 $(Q
)$(MAKE
) --no-print-directory
-C
$(REVENGLIBPATH
) clean
727 $(Q
)$(MAKE
) --no-print-directory
-C
$(TINYCBORLIBPATH
) clean
728 $(Q
)$(MAKE
) --no-print-directory
-C
$(WHEREAMILIBPATH
) clean
729 @
# Just in case someone compiled within these dirs:
730 $(Q
)$(MAKE
) --no-print-directory
-C
$(MBEDTLSLIBPATH
) clean
733 $(info [@
] Installing client to
$(DESTDIR
)$(PREFIX
)...
)
734 ifneq (,$(INSTALLBIN
))
735 $(Q
)$(MKDIR
) $(DESTDIR
)$(PREFIX
)$(PATHSEP
)$(INSTALLBINRELPATH
)
736 $(Q
)$(CP
) $(INSTALLBIN
) $(DESTDIR
)$(PREFIX
)$(PATHSEP
)$(INSTALLBINRELPATH
)
738 ifneq (,$(INSTALLSHARE
))
739 $(Q
)$(MKDIR
) $(DESTDIR
)$(PREFIX
)$(PATHSEP
)$(INSTALLSHARERELPATH
)
740 $(Q
)$(CP
) $(INSTALLSHARE
) $(DESTDIR
)$(PREFIX
)$(PATHSEP
)$(INSTALLSHARERELPATH
)
741 $(Q
)$(CP
) src
/pm3.py
$(DESTDIR
)$(PREFIX
)$(PATHSEP
)$(INSTALLSHARERELPATH
)/pyscripts
746 $(info [@
] Uninstalling client from
$(DESTDIR
)$(PREFIX
)...
)
747 ifneq (,$(INSTALLBIN
))
748 $(Q
)$(RM
) $(foreach tool
,$(INSTALLBIN
),$(DESTDIR
)$(PREFIX
)$(PATHSEP
)$(INSTALLBINRELPATH
)$(PATHSEP
)$(notdir $(tool
)))
750 ifneq (,$(INSTALLSHARE
))
751 $(Q
)$(RMDIR
) $(foreach tool
,$(INSTALLSHARE
),$(DESTDIR
)$(PREFIX
)$(PATHSEP
)$(INSTALLSHARERELPATH
)$(PATHSEP
)$(notdir $(tool
)))
756 $(info [=] TAR ..
/proxmark3-
$(platform
)-bin.
tar)
757 $(Q
)$(TAR
) $(TARFLAGS
) ..
/proxmark3-
$(platform
)-bin.
tar $(BINS
:%=client
/%) $(WINBINS
:%=client
/%)
759 ###########################
760 # local libraries targets #
761 ###########################
764 $(Q
)$(MAKE
) --no-print-directory
-C
$(AMIIBOLIBPATH
) all
766 $(CLIPARSERLIB
): .FORCE
768 $(Q
)$(MAKE
) --no-print-directory
-C
$(CLIPARSERLIBPATH
) all
770 $(HARDNESTEDLIB
): .FORCE
772 $(Q
)$(MAKE
) --no-print-directory
-C
$(HARDNESTEDLIBPATH
) all
774 $(JANSSONLIB
): .FORCE
775 ifneq ($(JANSSON_FOUND
),1)
777 $(Q
)$(MAKE
) --no-print-directory
-C
$(JANSSONLIBPATH
) all
781 ifneq ($(LUA_FOUND
),1)
782 $(info [*] MAKE
$@ for
$(LUAPLATFORM
))
783 $(Q
)$(MAKE
) --no-print-directory
-C
$(LUALIBPATH
) $(LUAPLATFORM
)
786 $(MBEDTLSLIB
): .FORCE
788 $(Q
)$(MAKE
) --no-print-directory
-C
$(MBEDTLSLIBPATH
) OBJDIR
=$(MBEDTLSLIBCLIENTRELPATH
)/$(OBJDIR
)/mbedtls BINDIR
=$(MBEDTLSLIBCLIENTRELPATH
)/$(OBJDIR
) all
792 $(Q
)$(MAKE
) --no-print-directory
-C
$(REVENGLIBPATH
) all
794 $(TINYCBORLIB
): .FORCE
796 $(Q
)$(MAKE
) --no-print-directory
-C
$(TINYCBORLIBPATH
) all
798 $(WHEREAMILIB
): .FORCE
799 ifneq ($(WHEREAMI_FOUND
),1)
801 $(Q
)$(MAKE
) --no-print-directory
-C
$(WHEREAMILIBPATH
) all
808 src
/pm3_luawrap.c
: pm3.i
810 $(Q
)$(SWIG
) -lua
-o
$@
$<
812 src
/pm3_pywrap.c
: pm3.i
814 $(Q
)$(SWIG
) -python
-o
$@
$<
820 .PHONY
: all clean install uninstall tarbin .FORCE
822 # version_pm3.c should be remade on every compilation
823 src
/version_pm3.c
: default_version_pm3.c
827 # easy printing of MAKE VARIABLES
828 print-
%: ; @echo
$* = $($*)
830 # SWIG files emit a number of warnings, we've to ignore them
832 $(OBJDIR
)/%wrap.o
: %wrap.c
$(OBJDIR
)/%.d
834 $(Q
)$(MKDIR
) $(dir $@
)
835 $(Q
)$(CC
) $(DEPFLAGS
) $(PM3CFLAGS
) -Wno-missing-prototypes
-Wno-missing-declarations
-Wno-missing-field-initializers
-c
-o
$@
$<
839 $(OBJDIR
)/%.o
: %.c
$(OBJDIR
)/%.d
841 $(Q
)$(MKDIR
) $(dir $@
)
842 $(Q
)$(CC
) $(DEPFLAGS
) $(PM3CFLAGS
) -c
-o
$@
$<
846 $(OBJDIR
)/%.o
: %.
cpp $(OBJDIR
)/%.d
848 $(Q
)$(MKDIR
) $(dir $@
)
849 $(Q
)$(CXX
) $(DEPFLAGS
) $(PM3CXXFLAGS
) $(CXXINCLUDES
) -c
-o
$@
$<
853 $(OBJDIR
)/%.o
: %.m
$(OBJDIR
)/%.d
855 $(Q
)$(MKDIR
) $(dir $@
)
856 $(Q
)$(CC
) $(DEPFLAGS
) $(PM3CFLAGS
) -c
-o
$@
$<
859 DEPENDENCY_FILES
= $(patsubst %.c
, $(OBJDIR
)/%.d
, $(SRCS
)) \
860 $(patsubst %wrap.c
, $(OBJDIR
)/%.d
, $(SWIGSRCS
)) \
861 $(patsubst %.
cpp, $(OBJDIR
)/%.d
, $(CXXSRCS
)) \
862 $(patsubst %.m
, $(OBJDIR
)/%.d
, $(OBJCSRCS
))
864 $(DEPENDENCY_FILES
): ;
865 .PRECIOUS
: $(DEPENDENCY_FILES
)
867 -include $(DEPENDENCY_FILES
)