summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--Makefile18
-rw-r--r--README2
-rw-r--r--uniso.c7
4 files changed, 27 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 5dbb921..48a0949 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
*.o
-libuniso.so*
+*.so
+*.so.*
+*.a
+uniso
diff --git a/Makefile b/Makefile
index babfb06..22b3eb7 100644
--- a/Makefile
+++ b/Makefile
@@ -3,21 +3,31 @@ ABI_VERSION := 0
SONAME := libuniso.so.$(ABI_VERSION)
OBJS := libuniso.o
+TARGETS := $(SONAME) libuniso.so uniso
CFLAGS ?= -g -Wall
CFLAGS += -fPIC
+CFLAGS += -I.
-all: libuniso.so
+uniso_OBJS := uniso.o
+uniso_LIBS := -luniso
+uniso_LDFLAGS += -L.
+
+all: $(TARGETS)
$(SONAME): $(OBJS)
- $(CC) -shared -Wl,-soname,$(SONAME) -o $@
+ $(CC) -shared -Wl,-soname,$(SONAME) $(LDFLAGS) $($@_LDFLAGS) -o $@ $^
libuniso.so: $(SONAME)
ln -s $< $@
%.o: %.c
- $(CC) $(CFLAGS) -c $^
+ $(CC) $(CFLAGS) $($@_CFLAGS) -c $^
+
+uniso: $(uniso_OBJS) libuniso.so
+ $(CC) $(LDFLAGS) -o $@ $($@_OBJS) $($@_LIBS)
clean:
- rm -f libuniso.so libuniso.so.$(ABI_VERSION) *.o
+ rm -f $(TARGETS) *.o
+
diff --git a/README b/README
new file mode 100644
index 0000000..083ad31
--- /dev/null
+++ b/README
@@ -0,0 +1,2 @@
+libuniso is a simple C library to extract iso9660 images on the fly
+
diff --git a/uniso.c b/uniso.c
new file mode 100644
index 0000000..bae938d
--- /dev/null
+++ b/uniso.c
@@ -0,0 +1,7 @@
+#include <unistd.h>
+#include <uniso.h>
+
+int main(int argc, char *argv[])
+{
+ return uniso(STDIN_FILENO);
+}