summaryrefslogtreecommitdiff
blob: c8f2f7ad326af4c7b905aa6469d89ebc1b22cf4a (plain)
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
--- GemPC410/Makefile
+++ GemPC410/Makefile
@@ -40,7 +40,7 @@
 
 libGemPC410.so: common $(targets)
 	rm -f $@
-	$(CC) -shared $(targets) $(common_targets) -o $@
+	$(CC) -shared $(LDFLAGS) $(targets) $(common_targets) -o $@
 	chmod -x $@
 	mv $@ $@.$(version)
 
--- GemPC430/Makefile
+++ GemPC430/Makefile
@@ -5,7 +5,7 @@
 # set these paths to where you installed pcsc-lite and libusb
 # you can use more than one path in each variable
 INCS = -I/usr/local/include `pkg-config libpcsclite --cflags`
-LIBS = -L/usr/local/lib
+LIBS = -L/usr/local/lib -lusb
 INSTALL_DIR = $(DESTDIR)`pkg-config libpcsclite --variable=usbdropdir`
 
 # use a correct default CFLAGS
@@ -14,7 +14,6 @@
 else
 CFLAGS += -Wall -fPIC -I. -I../common -DGEMPC=430 $(INCS)
 endif
-LDFLAGS = $(LIBS) -lusb
 
 # /home/rousseau/sc/pcsc/i/ifd-gempc-0.5.10/GemPC410 -> 0.5.10
 version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
@@ -27,7 +26,7 @@
 
 check: check_stamp
 check_stamp:
-	CFLAGS="$(INCS)" LDFLAGS="$(LIBS)" ../check 430
+	CFLAGS="$(INCS)" LIBS="$(LIBS)" ../check 430
 	touch check_stamp
 
 expert: ifd-GemPC430 libGemPC430.so
@@ -36,10 +35,10 @@
 	$(MAKE) -C ../common CFLAGS="$(CFLAGS) -I../GemPC430" all
 
 ifd-GemPC430: common $(targets) main.o ../common/GCdebug.o
-	$(CC) $(LDFLAGS) -o $@ $(targets) $(common_targets) main.o ../common/GCdebug.o
+	$(CC) $(LDFLAGS) -o $@ $(targets) $(common_targets) main.o ../common/GCdebug.o $(LIBS)
 
 libGemPC430.so: common $(targets)
-	$(CC) -shared $(LDFLAGS) -o $@ $(targets) $(common_targets)
+	$(CC) -shared $(LDFLAGS) -o $@ $(targets) $(common_targets) $(LIBS)
 
 main.o: ../GemPC410/main.c
 	$(CC) $(CFLAGS) -c -o $@ $^