mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
Cleaner makefile execution, use 'make Q=' if you want to see full lines
This commit is contained in:
parent
3bf26f2808
commit
8c0cd4cfa2
13 changed files with 253 additions and 145 deletions
|
@ -13,6 +13,10 @@
|
|||
# variables
|
||||
#
|
||||
|
||||
# Hide full compilation line:
|
||||
Q?=@
|
||||
# To see full command lines, use make Q=
|
||||
|
||||
# Make sure that all is the default target
|
||||
# (The including Makefile still needs to define what 'all' is)
|
||||
|
||||
|
@ -74,16 +78,20 @@ ASMOBJ = $(patsubst %.s,$(OBJDIR)/%.o,$(notdir $(ASMSRC)))
|
|||
VERSIONOBJ = $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(VERSIONSRC)))
|
||||
|
||||
$(THUMBOBJ): $(OBJDIR)/%.o: %.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) -mthumb -mthumb-interwork -o $@ $<
|
||||
$(info [-] CC $<)
|
||||
$(Q)$(CC) $(CFLAGS) -mthumb -mthumb-interwork -o $@ $<
|
||||
|
||||
$(ARMOBJ): $(OBJDIR)/%.o: %.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) -mthumb-interwork -o $@ $<
|
||||
$(info [-] CC $<)
|
||||
$(Q)$(CC) $(CFLAGS) -mthumb-interwork -o $@ $<
|
||||
|
||||
$(ASMOBJ): $(OBJDIR)/%.o: %.s
|
||||
$(CC) $(CFLAGS) -mthumb-interwork -o $@ $<
|
||||
$(info [-] CC $<)
|
||||
$(Q)$(CC) $(CFLAGS) -mthumb-interwork -o $@ $<
|
||||
|
||||
$(VERSIONOBJ): $(OBJDIR)/%.o: %.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) -mthumb -mthumb-interwork -o $@ $<
|
||||
$(info [-] CC $<)
|
||||
$(Q)$(CC) $(CFLAGS) -mthumb -mthumb-interwork -o $@ $<
|
||||
|
||||
# This objcopy call translates physical flash addresses to logical addresses
|
||||
# without touching start address or RAM addresses (.bss and .data sections)
|
||||
|
@ -93,7 +101,8 @@ OBJCOPY_TRANSLATIONS = --no-change-warnings \
|
|||
--change-section-address .bss+0 --change-section-address .data-0x100000 \
|
||||
--change-section-address .commonarea+0
|
||||
$(OBJDIR)/%.s19: $(OBJDIR)/%.elf
|
||||
$(OBJCOPY) -Osrec --srec-forceS3 --strip-debug $(OBJCOPY_TRANSLATIONS) $^ $@
|
||||
$(info [=] GEN $@)
|
||||
$(Q)$(OBJCOPY) -Osrec --srec-forceS3 --strip-debug $(OBJCOPY_TRANSLATIONS) $^ $@
|
||||
|
||||
# easy printing of MAKE VARIABLES
|
||||
print-%: ; @echo $* = $($*)
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# Hide full compilation line:
|
||||
Q?=@
|
||||
# To see full command lines, use make Q=
|
||||
|
||||
LIB_A = libmbedtls.a
|
||||
mbedtls_SOURCES = \
|
||||
|
@ -73,17 +76,19 @@ MYLIBS=
|
|||
MYOBJS=
|
||||
|
||||
$(LIB_A): $(CMDOBJS)
|
||||
$(AR) $(LIB_A) $(CMDOBJS)
|
||||
$(RANLIB) $(LIB_A)
|
||||
$(info [=] AR $@)
|
||||
$(Q)$(AR) $(LIB_A) $(CMDOBJS)
|
||||
$(Q)$(RANLIB) $(LIB_A)
|
||||
|
||||
all: $(LIB_A)
|
||||
|
||||
clean:
|
||||
$(RM) $(CLEAN)
|
||||
$(RM) $(LIB_A)
|
||||
$(Q)$(RM) $(CLEAN)
|
||||
$(Q)$(RM) $(LIB_A)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(CFLAGS) -c -o $@ $< $(LIBS)
|
||||
$(info [-] CC $<)
|
||||
$(Q)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(CFLAGS) -c -o $@ $< $(LIBS)
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue