proxmark3/tools/nonce2key/Makefile

24 lines
416 B
Makefile
Raw Normal View History

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)
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
2009-12-30 08:12:17 +08:00
clean:
@$(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 $@)
@$(CC) -MM $(CFLAGS) $< | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@