projects
/
project
/
uci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build variable sharing between uci and uci-lua, proper installation for lua plugin
[project/uci.git]
/
lua
/
Makefile
diff --git
a/lua/Makefile
b/lua/Makefile
index
29d7fbd
..
9cc6c39
100644
(file)
--- a/
lua/Makefile
+++ b/
lua/Makefile
@@
-1,27
+1,26
@@
-CC=gcc
-LD=ld
-CFLAGS=-O2 -Wall -Werror -pedantic --std=gnu99 -Wno-unused
+include ../Makefile.inc
+
CPPFLAGS=-I..
LIBS=-L.. -luci
CPPFLAGS=-I..
LIBS=-L.. -luci
-OS=$(shell uname)
-
LINK
=$(CC)
+
+
PLUGIN_LD
=$(CC)
ifeq ($(OS),Darwin)
ifeq ($(OS),Darwin)
-
SHLIB_
FLAGS=-bundle -undefined dynamic_lookup
+
PLUGIN_LD
FLAGS=-bundle -undefined dynamic_lookup
else
else
-
SHLIB_
FLAGS=-shared -Wl,-soname,$(SHLIB_FILE)
+
PLUGIN_LD
FLAGS=-shared -Wl,-soname,$(SHLIB_FILE)
endif
all: uci.so
uci.so: uci.o
endif
all: uci.so
uci.so: uci.o
- $(
LINK) $(SHLIB_
FLAGS) -o $@ $^ $(LIBS)
+ $(
PLUGIN_LD) $(PLUGIN_LD
FLAGS) -o $@ $^ $(LIBS)
%.o: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
install:
%.o: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
install:
- mkdir -p $(DESTDIR)
/usr/lib/lua
-
install -m0644 uci.so $(DESTDIR)/usr/lib/lua
/
+ mkdir -p $(DESTDIR)
$(prefix)/lib/lua/5.1
+
$(INSTALL) -m0644 uci.so $(DESTDIR)$(prefix)/lib/lua/5.1
/
clean:
rm -f *.so *.o uci.so
clean:
rm -f *.so *.o uci.so