diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-11-24 08:02:05 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-11-24 08:02:05 +0100 |
commit | 42ac16b95859cbb7057fadfff0ff4bc92cb0b374 (patch) | |
tree | 36ddc6c050b3f7e991992b742bb529785f84479e | |
parent | 3b4f0d39e34e5c81aa641d53fa0a2971ea970eb4 (diff) | |
download | libuniso-42ac16b95859cbb7057fadfff0ff4bc92cb0b374.tar.bz2 libuniso-42ac16b95859cbb7057fadfff0ff4bc92cb0b374.tar.xz |
uniso: add example application
-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); +} |