blob: 412f34b1cee391c15b293cfe4bf30d98ba68ee22 (
plain)
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
35
36
37
38
39
|
$NetBSD: patch-aa,v 1.10 2015/12/29 23:34:56 dholland Exp $
Avoid gmakeisms.
Use libtool.
--- makefile.orig 2011-01-16 10:51:17.000000000 +0300
+++ makefile 2011-03-30 20:38:01.000000000 +0400
@@ -57,19 +58,23 @@
LIBTARGET = $(LIBPREFIX)tinyscheme.$(SOsuf)
STATICLIBTARGET = $(LIBPREFIX)tinyscheme.$(LIBsuf)
-all: $(LIBTARGET) $(STATICLIBTARGET) scheme$(EXE_EXT)
+all: $(STATICLIBTARGET) scheme$(EXE_EXT)
-%.$(Osuf): %.c
- $(CC) -I. -c $(DEBUG) $(FEATURES) $(DL_FLAGS) $<
-
-$(LIBTARGET): $(OBJS)
- $(LD) $(LDFLAGS) $(OUT) $(OBJS) $(SYS_LIBS)
+.c.$(Osuf):
+ $(LIBTOOL) --mode=compile $(CC) -I. -c $(DEBUG) $(FEATURES) $(DL_FLAGS) $<
scheme$(EXE_EXT): $(OBJS)
- $(CC) -o $@ $(DEBUG) $(OBJS) $(SYS_LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(DEBUG) $(OBJS) $(LIBS:.a=.la) $(SYS_LIBS)
$(STATICLIBTARGET): $(OBJS)
- $(AR) $@ $(OBJS)
+ $(LIBTOOL) --mode=link $(CC) -o $(.TARGET:.a=.la) $(OBJS:.o=.lo) -rpath $(PREFIX)/lib -version-info 1:40
+
+install: all
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) $(STATICLIBTARGET:.a=.la) $(DESTDIR)$(PREFIX)/lib
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) scheme$(EXE_EXT) $(DESTDIR)$(PREFIX)/bin/tinyscheme
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(PREFIX)/share/tinyscheme
+ $(BSD_INSTALL_DATA) init.scm $(DESTDIR)$(PREFIX)/share/tinyscheme
+ $(BSD_INSTALL_DATA) scheme.h $(DESTDIR)$(PREFIX)/include/tinyscheme.h
$(OBJS): scheme.h scheme-private.h opdefines.h
dynload.$(Osuf): dynload.h
|