diff options
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | Makefile | 18 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | uniso.c | 7 |
4 files changed, 27 insertions, 5 deletions
@@ -1,2 +1,5 @@ *.o -libuniso.so* +*.so +*.so.* +*.a +uniso @@ -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 + @@ -0,0 +1,2 @@ +libuniso is a simple C library to extract iso9660 images on the fly + @@ -0,0 +1,7 @@ +#include <unistd.h> +#include <uniso.h> + +int main(int argc, char *argv[]) +{ + return uniso(STDIN_FILENO); +} |