Bonsoir , mon makefile est le suivant
Code makefile : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
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 $@ $<
j'ai tapé make install sur le terminal et
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
<a href="mailto:pi@raspberrypi:~/Desktop/sdk-k531/springprox_api/samples/c/reference/make.linux">pi@raspberrypi:~/Desktop/sdk-k531/sp...nce/make.linux</a> $ make install
cc -L../../../../runimage/linux_i386 ../ref_desfire.o -lsprox_desfire -lspringprox -lftdi -o ../ref_desfire
../ref_desfire.o : Dans la fonction « main » :
ref_desfire.c:(.text+0x500) : référence indéfinie vers « DesFireCard_SelectApplication »
ref_desfire.c:(.text+0x524) : référence indéfinie vers « DesFire_GetErrorMessage »
ref_desfire.c:(.text+0x558) : référence indéfinie vers « DesFireCard_GetVersion »
ref_desfire.c:(.text+0x57c) : référence indéfinie vers « DesFire_GetErrorMessage »
ref_desfire.c:(.text+0x5d4) : référence indéfinie vers « DesFireCard_GetKeyVersi
sachant que mon programme principal est ref_desfire.c et les librairies sont libspringprox.a et libsprox_desfire.a plus 2 headers springprox.h et sprox_desfire.h
quelqu'un peut m'aider svp