proxmark3/client/tinycbor/Makefile

63 lines
1 KiB
Makefile
Raw Normal View History

# Hide full compilation line:
ifneq ($(V),1)
Q?=@
endif
# To see full command lines, use make V=1
2018-11-16 23:05:48 +08:00
LIB_A = tinycbor.a
tinycbor_SOURCES = \
cborencoder.c \
cborencoder_close_container_checked.c \
cborerrorstrings.c \
cborparser.c \
cborparser_dup_string.c \
cborpretty.c \
cbortojson.c \
cborvalidation.c \
2019-03-10 18:35:03 +08:00
2018-11-16 23:05:48 +08:00
CFILES = $(filter %.c, $(tinycbor_SOURCES))
CMDOBJS = $(CFILES:%.c=%.o)
CLEAN = $(CMDOBJS)
2019-03-10 18:35:03 +08:00
2019-07-11 00:43:19 +08:00
platform = $(shell uname)
2018-11-16 23:05:48 +08:00
CC= gcc
CFLAGS= -O2 -Wall -Wno-unused-variable -Wno-unused-function
LIBS= $(SYSLIBS) $(MYLIBS)
2018-11-16 23:05:48 +08:00
DEFAULT_INCLUDES = -I. -I..
DEFS = -DHAVE_STDINT_H
2019-07-11 00:43:19 +08:00
ifeq ($(platform),Darwin)
AR= /usr/bin/ar rcs
RANLIB= /usr/bin/ranlib
else
2018-11-16 23:05:48 +08:00
AR= ar rcs
RANLIB= ranlib
2019-07-11 00:43:19 +08:00
endif
2018-11-16 23:05:48 +08:00
RM= rm -f
TST= echo
SYSLDFLAGS=
SYSLIBS=
MYLIBS=
MYOBJS=
$(LIB_A): $(CMDOBJS)
$(info [=] AR $@)
$(Q)$(AR) $(LIB_A) $(CMDOBJS)
$(Q)$(RANLIB) $(LIB_A)
2019-03-10 18:35:03 +08:00
all: $(LIB_A)
2018-11-16 23:05:48 +08:00
clean:
$(Q)$(RM) $(CLEAN)
$(Q)$(RM) $(LIB_A)
2019-03-10 18:35:03 +08:00
2018-11-16 23:05:48 +08:00
%.o: %.c
$(info [-] CC $<)
$(Q)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(CFLAGS) -c -o $@ $< $(LIBS)
2019-03-10 18:35:03 +08:00
2018-11-16 23:05:48 +08:00
.PHONY: all clean