summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2005-11-08 08:34:15 +0000
committerlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2005-11-08 08:34:15 +0000
commit05c7e304271bcf88901da3782fcd3f28a0c7c9cf (patch)
treec7972af3be2f8a6619af551faa980cd699399b1e
parentea11c6e508eb88d18847f4027bbc0a5ced0200b3 (diff)
use autoconf/automake
git-svn-id: https://svn.gnumonks.org/trunk/librfid@1658 e0336214-984f-0b4b-a45f-81c69e1f0ede
-rw-r--r--Makefile26
-rw-r--r--Makefile.am8
-rwxr-xr-xautogen.sh18
-rw-r--r--include/Makefile.am2
-rw-r--r--include/rfid/Makefile.am10
-rw-r--r--src/Makefile.am13
-rw-r--r--src/rc632.h (renamed from rc632.h)0
-rw-r--r--src/rfid.c (renamed from rfid.c)0
-rw-r--r--src/rfid_asic_rc632.c (renamed from rfid_asic_rc632.c)0
-rw-r--r--src/rfid_asic_rc632_14443a.c (renamed from rfid_asic_rc632_14443a.c)0
-rw-r--r--src/rfid_asic_rc632_14443b.c (renamed from rfid_asic_rc632_14443b.c)0
-rw-r--r--src/rfid_asic_rc632_mifare.c (renamed from rfid_asic_rc632_mifare.c)0
-rw-r--r--src/rfid_iso14443_common.c (renamed from rfid_iso14443_common.c)0
-rw-r--r--src/rfid_iso14443_common.h (renamed from rfid_iso14443_common.h)0
-rw-r--r--src/rfid_layer2.c (renamed from rfid_layer2.c)0
-rw-r--r--src/rfid_layer2_iso14443a.c (renamed from rfid_layer2_iso14443a.c)0
-rw-r--r--src/rfid_layer2_iso14443b.c (renamed from rfid_layer2_iso14443b.c)0
-rw-r--r--src/rfid_layer2_iso15693.c (renamed from rfid_layer2_iso15693.c)0
-rw-r--r--src/rfid_proto_mifare_classic.c (renamed from rfid_proto_mifare_classic.c)0
-rw-r--r--src/rfid_proto_mifare_ul.c (renamed from rfid_proto_mifare_ul.c)0
-rw-r--r--src/rfid_proto_tcl.c (renamed from rfid_proto_tcl.c)0
-rw-r--r--src/rfid_protocol.c (renamed from rfid_protocol.c)0
-rw-r--r--src/rfid_reader.c (renamed from rfid_reader.c)0
-rw-r--r--src/rfid_reader_cm5121.c (renamed from rfid_reader_cm5121.c)0
-rw-r--r--src/rfid_reader_cm5121_ccid_direct.c (renamed from rfid_reader_cm5121_ccid_direct.c)0
-rw-r--r--src/rfid_reader_cm5121_openct.c (renamed from rfid_reader_cm5121_openct.c)0
-rw-r--r--utils/Makefile.am8
-rw-r--r--utils/openct-escape.c (renamed from openct-escape.c)0
28 files changed, 59 insertions, 26 deletions
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 691c24c..0000000
--- a/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-
-CFLAGS:=-Wall -g -I/usr/local/include -Iinclude
-LDFLAGS:= -lusb
-
-LIBRFID_OBJS=rfid_layer2.o rfid_layer2_iso14443a.o rfid_layer2_iso14443b.o rfid_layer2_iso15693.o rfid_asic_rc632.o rfid_reader_cm5121.o rfid.o rfid_protocol.o rfid_proto_tcl.o rfid_proto_mifare_ul.o rfid_proto_mifare_classic.o rfid_iso14443_common.o rfid_reader.o
-
-# uncomment this if you want to use OpenCT
-LDFLAGS+=-lopenct
-LIBRFID_OBJS+=rfid_reader_cm5121_openct.o
-
-# uncomment this if you want to use our internal CCID driver
-#LIBRFID_OBJS+=rfid_reader_cm5121_ccid_direct.o ccid/ccid-driver.o
-
-all: openct-escape
-
-openct-escape: openct-escape.o librfid.a
- $(CC) $(LDFLAGS) -o $@ $^
-
-librfid.a: $(LIBRFID_OBJS)
- ar r $@ $^
-
-%.o: %.c
- $(CC) $(CFLAGS) -DHAVE_LIBUSB -DUSE_INTERNAL_CCID_DRIVER -o $@ -c $^
-
-clean:
- rm -f *.o openct-escape librfid.a
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..69140e2
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,8 @@
+AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
+
+SUBDIRS = include src utils
+LINKOPTS = -lusb
+
+$(OBJECTS): libtool
+libtool: $(LIBTOOL_DEPS)
+ $(SHELL) ./config.status --recheck
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..ccce4f0
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+run ()
+{
+ echo "running: $*"
+ eval $*
+
+ if test $? != 0 ; then
+ echo "error: while running '$*'"
+ exit 1
+ fi
+}
+
+run aclocal
+#run autoheader
+run libtoolize -f
+run automake -a
+run autoconf
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 0000000..df5706a
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1,2 @@
+
+SUBDIRS = rfid
diff --git a/include/rfid/Makefile.am b/include/rfid/Makefile.am
new file mode 100644
index 0000000..59ce8cb
--- /dev/null
+++ b/include/rfid/Makefile.am
@@ -0,0 +1,10 @@
+
+pkginclude_HEADERS = rfid.h rfid_asic.h rfid_asic_rc632.h \
+ rfid_layer2.h rfid_layer2_iso14443a.h \
+ rfid_layer2_iso14443b.h rfid_layer2_iso15693.h \
+ rfid_protocol.h rfid_protocol_tcl.h \
+ rfid_protocol_mifare_ul.h \
+ rfid_protocol_mifare_classic.h \
+ rfid_reader.h \
+ rfid_reader_cm5121.h
+
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..2f35d9b
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,13 @@
+LIBVERSION= 0:0:0
+INCLUDES = $(all_includes) -I$(top_srcdir)/include
+
+lib_LTLIBRARIES = librfid.la
+
+CORE=rfid.c rfid_layer2.c rfid_protocol.c rfid_reader.c
+L2=rfid_layer2_iso14443a.c rfid_layer2_14443b.c rfid_layer2_iso15693.c rfid_iso14443_common.o
+PROTO=rfid_proto_tcl.c rfid_proto_mifare_ul.c rfid_proto_mifare_classic.c
+READER=rfid_reader_cm5121.c rfid_asic_rc632.c
+
+librfid_la_LDFLAGS = -Wc,-nostartfiles -version-info $(LIBVERSION)
+librfid_la_SOURCES = $(CORE) $(L2) $(PROTO) $(READER)
+
diff --git a/rc632.h b/src/rc632.h
index 4ad0e99..4ad0e99 100644
--- a/rc632.h
+++ b/src/rc632.h
diff --git a/rfid.c b/src/rfid.c
index be72f12..be72f12 100644
--- a/rfid.c
+++ b/src/rfid.c
diff --git a/rfid_asic_rc632.c b/src/rfid_asic_rc632.c
index 4377d73..4377d73 100644
--- a/rfid_asic_rc632.c
+++ b/src/rfid_asic_rc632.c
diff --git a/rfid_asic_rc632_14443a.c b/src/rfid_asic_rc632_14443a.c
index 4c8a37b..4c8a37b 100644
--- a/rfid_asic_rc632_14443a.c
+++ b/src/rfid_asic_rc632_14443a.c
diff --git a/rfid_asic_rc632_14443b.c b/src/rfid_asic_rc632_14443b.c
index 62aa224..62aa224 100644
--- a/rfid_asic_rc632_14443b.c
+++ b/src/rfid_asic_rc632_14443b.c
diff --git a/rfid_asic_rc632_mifare.c b/src/rfid_asic_rc632_mifare.c
index 9bfb0ae..9bfb0ae 100644
--- a/rfid_asic_rc632_mifare.c
+++ b/src/rfid_asic_rc632_mifare.c
diff --git a/rfid_iso14443_common.c b/src/rfid_iso14443_common.c
index 38fed6b..38fed6b 100644
--- a/rfid_iso14443_common.c
+++ b/src/rfid_iso14443_common.c
diff --git a/rfid_iso14443_common.h b/src/rfid_iso14443_common.h
index 848d983..848d983 100644
--- a/rfid_iso14443_common.h
+++ b/src/rfid_iso14443_common.h
diff --git a/rfid_layer2.c b/src/rfid_layer2.c
index c1ab6a6..c1ab6a6 100644
--- a/rfid_layer2.c
+++ b/src/rfid_layer2.c
diff --git a/rfid_layer2_iso14443a.c b/src/rfid_layer2_iso14443a.c
index d93f917..d93f917 100644
--- a/rfid_layer2_iso14443a.c
+++ b/src/rfid_layer2_iso14443a.c
diff --git a/rfid_layer2_iso14443b.c b/src/rfid_layer2_iso14443b.c
index f874071..f874071 100644
--- a/rfid_layer2_iso14443b.c
+++ b/src/rfid_layer2_iso14443b.c
diff --git a/rfid_layer2_iso15693.c b/src/rfid_layer2_iso15693.c
index 15ff18a..15ff18a 100644
--- a/rfid_layer2_iso15693.c
+++ b/src/rfid_layer2_iso15693.c
diff --git a/rfid_proto_mifare_classic.c b/src/rfid_proto_mifare_classic.c
index 10de288..10de288 100644
--- a/rfid_proto_mifare_classic.c
+++ b/src/rfid_proto_mifare_classic.c
diff --git a/rfid_proto_mifare_ul.c b/src/rfid_proto_mifare_ul.c
index 9e5363f..9e5363f 100644
--- a/rfid_proto_mifare_ul.c
+++ b/src/rfid_proto_mifare_ul.c
diff --git a/rfid_proto_tcl.c b/src/rfid_proto_tcl.c
index f070614..f070614 100644
--- a/rfid_proto_tcl.c
+++ b/src/rfid_proto_tcl.c
diff --git a/rfid_protocol.c b/src/rfid_protocol.c
index abbd04d..abbd04d 100644
--- a/rfid_protocol.c
+++ b/src/rfid_protocol.c
diff --git a/rfid_reader.c b/src/rfid_reader.c
index 9e46a29..9e46a29 100644
--- a/rfid_reader.c
+++ b/src/rfid_reader.c
diff --git a/rfid_reader_cm5121.c b/src/rfid_reader_cm5121.c
index 978e18f..978e18f 100644
--- a/rfid_reader_cm5121.c
+++ b/src/rfid_reader_cm5121.c
diff --git a/rfid_reader_cm5121_ccid_direct.c b/src/rfid_reader_cm5121_ccid_direct.c
index 7f53bb7..7f53bb7 100644
--- a/rfid_reader_cm5121_ccid_direct.c
+++ b/src/rfid_reader_cm5121_ccid_direct.c
diff --git a/rfid_reader_cm5121_openct.c b/src/rfid_reader_cm5121_openct.c
index 9d96638..9d96638 100644
--- a/rfid_reader_cm5121_openct.c
+++ b/src/rfid_reader_cm5121_openct.c
diff --git a/utils/Makefile.am b/utils/Makefile.am
new file mode 100644
index 0000000..cddde17
--- /dev/null
+++ b/utils/Makefile.am
@@ -0,0 +1,8 @@
+INCLUDES = $(all_includes) -I$(top_srcdir)/include
+
+bin_PROGRAMS = openct-escape
+
+openct_escape_SOURCES = openct-escape.c
+openct_escape_LDADD = ../src/librfid.la
+openct_escape_LDFLAGS = -dynamic
+
diff --git a/openct-escape.c b/utils/openct-escape.c
index aec258c..aec258c 100644
--- a/openct-escape.c
+++ b/utils/openct-escape.c
personal git repositories of Harald Welte. Your mileage may vary