projects
/
project
/
uci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
reorganize some code, add an extra command for adding unnamed sections
[project/uci.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
65a38c7
..
db690e7
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-17,14
+17,18
@@
ifneq ($(DEBUG),)
endif
OS=$(shell uname)
ifeq ($(OS),Darwin)
endif
OS=$(shell uname)
ifeq ($(OS),Darwin)
+ LINK=$(LD)
SHLIB_EXT=dylib
SHLIB_FLAGS=-dylib
else
SHLIB_EXT=dylib
SHLIB_FLAGS=-dylib
else
+ LINK=$(CC)
SHLIB_EXT=so
SHLIB_EXT=so
- SHLIB_FLAGS=-shared -Wl,soname,$(SHLIB_FILE)
+ SHLIB_FLAGS=-shared -Wl,
-
soname,$(SHLIB_FILE)
endif
SHLIB_FILE=libuci.$(SHLIB_EXT).$(VERSION)
endif
SHLIB_FILE=libuci.$(SHLIB_EXT).$(VERSION)
+LIBUCI_DEPS=file.c history.c list.c util.c err.h uci.h
+
all: uci-static uci libuci.$(SHLIB_EXT)
cli.o: cli.c uci.h
all: uci-static uci libuci.$(SHLIB_EXT)
cli.o: cli.c uci.h
@@
-35,10
+39,10
@@
uci: cli.o libuci.$(SHLIB_EXT)
uci-static: cli.o libuci.a
$(CC) $(CFLAGS) -o $@ $^
uci-static: cli.o libuci.a
$(CC) $(CFLAGS) -o $@ $^
-libuci-static.o: libuci.c
file.c uci.h list.c err.h util.c
+libuci-static.o: libuci.c
$(LIBUCI_DEPS)
$(CC) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -c -o $@ $<
-libuci-shared.o: libuci.c
file.c uci.h list.c err.h util.c
+libuci-shared.o: libuci.c
$(LIBUCI_DEPS)
$(CC) $(CFLAGS) $(FPIC) -c -o $@ $<
libuci.a: libuci-static.o
$(CC) $(CFLAGS) $(FPIC) -c -o $@ $<
libuci.a: libuci-static.o
@@
-47,7
+51,7
@@
libuci.a: libuci-static.o
$(RANLIB) $@
libuci.$(SHLIB_EXT): libuci-shared.o
$(RANLIB) $@
libuci.$(SHLIB_EXT): libuci-shared.o
- $(L
D
) $(SHLIB_FLAGS) -o $(SHLIB_FILE) $^ $(LIBS)
+ $(L
INK
) $(SHLIB_FLAGS) -o $(SHLIB_FILE) $^ $(LIBS)
ln -sf $(SHLIB_FILE) $@
clean:
ln -sf $(SHLIB_FILE) $@
clean: