mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-11-13 13:20:45 +08:00
62 lines
1 KiB
Makefile
62 lines
1 KiB
Makefile
# Hide full compilation line:
|
|
ifneq ($(V),1)
|
|
Q?=@
|
|
endif
|
|
# To see full command lines, use make V=1
|
|
|
|
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 \
|
|
|
|
CFILES = $(filter %.c, $(tinycbor_SOURCES))
|
|
CMDOBJS = $(CFILES:%.c=%.o)
|
|
CLEAN = $(CMDOBJS)
|
|
|
|
platform = $(shell uname)
|
|
|
|
CC= gcc
|
|
CFLAGS= -O2 -Wall -Wno-unused-variable -Wno-unused-function
|
|
LIBS= $(SYSLIBS) $(MYLIBS)
|
|
DEFAULT_INCLUDES = -I. -I..
|
|
DEFS = -DHAVE_STDINT_H
|
|
|
|
ifeq ($(platform),Darwin)
|
|
AR= /usr/bin/ar rcs
|
|
RANLIB= /usr/bin/ranlib
|
|
else
|
|
AR= ar rcs
|
|
RANLIB= ranlib
|
|
endif
|
|
RM= rm -f
|
|
TST= echo
|
|
|
|
SYSLDFLAGS=
|
|
SYSLIBS=
|
|
|
|
MYLIBS=
|
|
MYOBJS=
|
|
|
|
$(LIB_A): $(CMDOBJS)
|
|
$(info [=] AR $@)
|
|
$(Q)$(AR) $(LIB_A) $(CMDOBJS)
|
|
$(Q)$(RANLIB) $(LIB_A)
|
|
|
|
all: $(LIB_A)
|
|
|
|
clean:
|
|
$(Q)$(RM) $(CLEAN)
|
|
$(Q)$(RM) $(LIB_A)
|
|
|
|
%.o: %.c
|
|
$(info [-] CC $<)
|
|
$(Q)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(CFLAGS) -c -o $@ $< $(LIBS)
|
|
|
|
.PHONY: all clean
|
|
|