File: fix-build-system.diff

package info (click to toggle)
lua-augeas 0.1.1-3
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, jessie, jessie-kfreebsd, stretch
  • size: 80 kB
  • ctags: 54
  • sloc: ansic: 290; makefile: 52
file content (31 lines) | stat: -rw-r--r-- 744 bytes parent folder | download | duplicates (3)
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
--- a/Makefile
+++ b/Makefile
@@ -10,21 +10,23 @@
 FULL_VERSION    := $(VERSION)
 endif
 
-AUGEAS_LIBS= $(shell pkg-config --libs augeas)
+#AUGEAS_LIBS= $(shell pkg-config --libs augeas)
 OBJS = laugeas.o
-LIBS = $(AUGEAS_LIBS)
+#LIBS = $(AUGEAS_LIBS)
 
-CFLAGS ?= -g -Wall -Werror
+
+CFLAGS += -g -Wall -Werror
 CFLAGS += -fPIC
 CFLAGS += -DVERSION=\"$(FULL_VERSION)\"
+CFLAGS += $(shell pkg-config augeas --cflags) $(shell pkg-config lua5.1 --cflags)
 
-LDFLAGS += -L/lib
+LDFLAGS += $(shell pkg-config augeas --libs) $(shell pkg-config lua5.1 --libs)
 
 all:	augeas.so
 
 
 augeas.so: $(OBJS)
-	$(CC) $(LDFLAGS) -o $@  -fPIC -shared $^ $(LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@  -fPIC -shared $^ $(LIBS)
 
 clean:
 	rm -f augeas.so $(OBJS)