proxmark3/tools/nonce2key/Makefile

33 lines
600 B
Makefile
Raw Normal View History

# Hide full compilation line:
Q?=@
# To see full command lines, use make Q=
2009-12-30 08:12:17 +08:00
CC = gcc
CFLAGS = -std=c99 -Wall -O3 -I.
LDFLAGS = -std=c99 -Wall
SRC := $(wildcard *.c)
OBJ := $(SRC:.c=.o)
DEP := $(SRC:.c=.d)
PROG := nonce2key
2009-12-30 08:12:17 +08:00
all: $(PROG)
2009-12-30 08:12:17 +08:00
$(PROG): $(OBJ)
$(info [=] LD $@)
$(Q)$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
2009-12-30 08:12:17 +08:00
clean:
$(Q)$(RM) $(DEP) $(OBJ) $(PROG)
2009-12-30 08:12:17 +08:00
ifneq ($(filter clean,$(MAKECMDGOALS)),clean)
-include $(DEP)
endif
2009-12-30 08:12:17 +08:00
%.d: %.c
$(info [-] GEN $@)
$(Q)$(CC) -MM $(CFLAGS) $< | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@
%.o: %.c
$(info [-] CC $<)
$(Q)$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<