forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tinyscheme-1.41-makefile.patch
50 lines (42 loc) · 1.13 KB
/
tinyscheme-1.41-makefile.patch
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
40
41
42
43
44
45
46
47
48
49
50
diff -ru a/makefile b/makefile
--- a/makefile 2013-04-14 20:08:33.000000000 +0000
+++ b/makefile 2013-12-11 11:59:58.688782748 +0000
@@ -18,8 +18,7 @@
#AR= echo
# Unix, generally
-CC = gcc -fpic -pedantic
-DEBUG=-g -Wall -Wno-char-subscripts -O
+#CC = $(CC)
Osuf=o
SOsuf=so
LIBsuf=a
@@ -27,12 +26,11 @@
LIBPREFIX=lib
OUT = -o $@
RM= -rm -f
-AR= ar crs
+#AR= $(AR)
+ARFLAGS = crs
# Linux
-LD = gcc
-LDFLAGS = -shared
-DEBUG=-g -Wno-char-subscripts -O
+#LD = $(CC)
SYS_LIBS= -ldl -lm
PLATFORM_FEATURES= -DSUN_DL=1
@@ -71,16 +69,16 @@
all: $(LIBTARGET) $(STATICLIBTARGET) scheme$(EXE_EXT)
%.$(Osuf): %.c
- $(CC) -I. -c $(DEBUG) $(FEATURES) $(DL_FLAGS) $<
+ $(CC) -fpic $(CFLAGS) -I. -c $(FEATURES) $(DL_FLAGS) $<
$(LIBTARGET): $(OBJS)
- $(LD) $(LDFLAGS) $(OUT) $(OBJS) $(SYS_LIBS)
+ $(CC) -shared $(LDFLAGS) -Wl,-soname=$@ -o $@ $(OUT) $(OBJS) $(SYS_LIBS)
scheme$(EXE_EXT): $(OBJS)
- $(CC) -o $@ $(DEBUG) $(OBJS) $(SYS_LIBS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(SYS_LIBS)
$(STATICLIBTARGET): $(OBJS)
- $(AR) $@ $(OBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS)
$(OBJS): scheme.h scheme-private.h opdefines.h
dynload.$(Osuf): dynload.h