Added
Link Here
|
0 |
- |
1 |
--- Makefile.sharedlibrary.orig 2020-10-12 22:23:10 UTC |
|
|
2 |
+++ Makefile.sharedlibrary |
3 |
@@ -52,22 +52,20 @@ INSTALL_PREFIX = /usr/local |
4 |
DUKTAPE_SRCDIR = ./src |
5 |
#DUKTAPE_SRCDIR = ./src-noline |
6 |
|
7 |
-CC = gcc |
8 |
- |
9 |
.PHONY: all |
10 |
-all: libduktape.$(SO_REALNAME_SUFFIX) libduktaped.$(SO_REALNAME_SUFFIX) |
11 |
+all: libduktape.$(SO_REALNAME_SUFFIX) |
12 |
|
13 |
# If the default duk_config.h is not suitable for the distribution, modify it |
14 |
# before compiling the shared library and copy the same, edited duk_config.h |
15 |
# to $INSTALL_PREFIX/include on installation. |
16 |
|
17 |
libduktape.$(SO_REALNAME_SUFFIX): |
18 |
- $(CC) -shared -fPIC -Wall -Wextra -Os -Wl,$(LD_SONAME_ARG),libduktape.$(SO_SONAME_SUFFIX) \ |
19 |
+ $(CC) -shared -fPIC -Wall -Wextra ${CFLAGS} -Wl,$(LD_SONAME_ARG),libduktape.$(SO_SONAME_SUFFIX) \ |
20 |
-o $@ $(DUKTAPE_SRCDIR)/duktape.c |
21 |
|
22 |
-libduktaped.$(SO_REALNAME_SUFFIX): |
23 |
- $(CC) -shared -fPIC -g -Wall -Wextra -Os -Wl,$(LD_SONAME_ARG),libduktaped.$(SO_SONAME_SUFFIX) \ |
24 |
- -o $@ $(DUKTAPE_SRCDIR)/duktape.c |
25 |
+#libduktaped.$(SO_REALNAME_SUFFIX): |
26 |
+# $(CC) -shared -fPIC -g -Wall -Wextra -Os -Wl,$(LD_SONAME_ARG),libduktaped.$(SO_SONAME_SUFFIX) \ |
27 |
+# -o $@ $(DUKTAPE_SRCDIR)/duktape.c |
28 |
|
29 |
# Symlinks depend on platform conventions. |
30 |
.PHONY: install |
31 |
@@ -77,12 +75,12 @@ install: libduktape.$(SO_REALNAME_SUFFIX) libduktaped. |
32 |
rm -f $(INSTALL_PREFIX)/lib/libduktape.so $(INSTALL_PREFIX)/lib/libduktape.$(SO_SONAME_SUFFIX) |
33 |
ln -s libduktape.$(SO_REALNAME_SUFFIX) $(INSTALL_PREFIX)/lib/libduktape.so |
34 |
ln -s libduktape.$(SO_REALNAME_SUFFIX) $(INSTALL_PREFIX)/lib/libduktape.$(SO_SONAME_SUFFIX) |
35 |
- rm -f $(INSTALL_PREFIX)/lib/libduktaped.so $(INSTALL_PREFIX)/lib/libduktaped.$(SO_SONAME_SUFFIX) |
36 |
- ln -s libduktaped.$(SO_REALNAME_SUFFIX) $(INSTALL_PREFIX)/lib/libduktaped.so |
37 |
- ln -s libduktaped.$(SO_REALNAME_SUFFIX) $(INSTALL_PREFIX)/lib/libduktaped.$(SO_SONAME_SUFFIX) |
38 |
+# rm -f $(INSTALL_PREFIX)/lib/libduktaped.so $(INSTALL_PREFIX)/lib/libduktaped.$(SO_SONAME_SUFFIX) |
39 |
+# ln -s libduktaped.$(SO_REALNAME_SUFFIX) $(INSTALL_PREFIX)/lib/libduktaped.so |
40 |
+# ln -s libduktaped.$(SO_REALNAME_SUFFIX) $(INSTALL_PREFIX)/lib/libduktaped.$(SO_SONAME_SUFFIX) |
41 |
mkdir -p $(INSTALL_PREFIX)/include/ |
42 |
cp $(DUKTAPE_SRCDIR)/duktape.h $(DUKTAPE_SRCDIR)/duk_config.h $(INSTALL_PREFIX)/include/ |
43 |
|
44 |
CCOPTS = -I./examples/cmdline |
45 |
duk: |
46 |
- $(CC) $(CCOPTS) -I$(INSTALL_PREFIX)/include -L$(INSTALL_PREFIX)/lib -Wall -Wextra -Os -o $@ ./examples/cmdline/duk_cmdline.c -lduktape -lm |
47 |
+ $(CC) $(CCOPTS) -I$(INSTALL_PREFIX)/include -L$(INSTALL_PREFIX)/lib -Wall -Wextra ${CFLAGS} -o $@ ./examples/cmdline/duk_cmdline.c -lduktape -lm |