| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 
 | SAMPLEDIR = $(shell dirname `pwd`)
TOPDIR = $(shell dirname $(SAMPLEDIR))
 
 
#
# This is the directory where libraries are to be found
# You'll have to edit this to match your own tree
#
LIBS_DIR:=../../../../runimage/linux_i386
 
#
# This is the target directory for "make install"
# You'll have to edit this to match your own tree
#
INSTALL_DIR:=../../../../runimage/linux_i386
 
#
# Here's the compiler command line
#
CFLAGS += -Wall -I ../../../../library/inc
 
#
# Here's the linker command line
#
LDFLAGS += -L$(LIBS_DIR)
LDLIBS  += -lsprox_desfire -lspringprox -lftdi
 
# libftdi (-lftdi) is required is SpringProx library has been compiled with USB support
 
#CCFLAGS+=/D _DEBUG
 
#
# Build the programs
#
SOURCES:=$(wildcard ../*.c)
OBJECTS:=$(patsubst %.c,%.o,$(SOURCES))
PROGRAMS:=$(patsubst %.c,%,$(SOURCES))
 
all: $(PROGRAMS)
 
install: $(PROGRAMS)
	cp $(PROGRAMS) $(INSTALL_DIR)
 
clean:
	rm $(PROGRAMS)
 
# -D _DEBUG
 
ref_showuid: ref_showuid.o
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
	rm $^
 
ref_mifare: ref_mifare.o
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
	rm $^
 
ref_mif_ul: ref_mif_ul.o
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
	rm $^
 
ref_smartcard: ref_smartcard.o
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
	rm $^
 
ref_desfire: ref_desfire.o
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
	rm $^
 
ref_icao: ref_icao.o
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
	rm $^
 
%.o: %.c
	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< | 
Partager