diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..622de73 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ + +LUA_LIBDIR = /usr/lib/lua/5.1 + +VERSION = 0.1 +GIT_REV := $(shell test -d .git && git describe || echo exported) +ifneq ($(GIT_REV), exported) +FULL_VERSION := $(GIT_REV) +FULL_VERSION := $(patsubst v%,%,$(FULL_VERSION)) +else +FULL_VERSION := $(VERSION) +endif + +AUGEAS_LIBS= $(shell pkg-config --libs augeas) +OBJS = laugeas.o +LIBS = $(AUGEAS_LIBS) + +CFLAGS ?= -g -Wall -Werror +CFLAGS += -fPIC +CFLAGS += -DVERSION=\"$(FULL_VERSION)\" + +LDFLAGS += -L/lib + +all: augeas.so + + +augeas.so: $(OBJS) + $(CC) $(LDFLAGS) -o $@ -fPIC -shared $^ $(LIBS) + +clean: + rm -f augeas.so $(OBJS) + + |