1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
LUA_LIBDIR = /usr/lib/lua/5.1
VERSION = 0.1.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)\"
CFLAGS += $(shell pkg-config augeas --cflags) $(shell pkg-config lua5.1 --cflags)
LDFLAGS += $(shell pkg-config augeas --libs) $(shell pkg-config lua5.1 --libs)
all: augeas.so
augeas.so: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ -fPIC -shared $^ $(LIBS)
clean:
rm -f augeas.so $(OBJS)
|