summaryrefslogtreecommitdiff
blob: 211028c7b09484aaa40db822c3193a8cdc0449f8 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
diff --git a/lib/libOSSlib/Makefile b/lib/libOSSlib/Makefile
index 98029f1..a9bd175 100644
--- a/lib/libOSSlib/Makefile
+++ b/lib/libOSSlib/Makefile
@@ -1,6 +1,6 @@
 OBJS=libmain.o midiparser.o play_event.o
 INSTALLLIB=/lib
-LDFLAGS=-shared -fPIC
+LDFLAGS+=-shared -fPIC
 CFLAGS=-O -fPIC
 #LDFLAGS=-Bdynamic
 AROPTS=rc
diff --git a/lib/libsalsa/Makefile b/lib/libsalsa/Makefile
index 5f8216b..863ba7f 100644
--- a/lib/libsalsa/Makefile
+++ b/lib/libsalsa/Makefile
@@ -46,7 +46,7 @@ rawmidi.lo:	rawmidi.c
 		$(LIBTOOL) --mode=compile ${CC} $(CFLAGS) -c rawmidi.c 
 
 libsalsa.la:   $(LOBJECTS)
-		$(LIBTOOL) --mode=link ${CC} -rpath /usr/lib -Wl,--version-script=Versions -version-info 2:0:0 -o libsalsa.la $(LOBJECTS) -L../libOSSlib -lOSSlib
+		$(LIBTOOL) --mode=link ${CC} -rpath /usr/lib -Wl,--version-script=Versions -version-info 2:0:0 -o libsalsa.la $(LDFLAGS) $(LOBJECTS) -L../libOSSlib -lOSSlib
 
 install:	libsalsa.la
 		$(LIBTOOL) cp libsalsa.la /usr/lib
diff --git a/setup/srcconf.c b/setup/srcconf.c
index 241c590..85bac58 100644
--- a/setup/srcconf.c
+++ b/setup/srcconf.c
@@ -928,7 +928,7 @@ printf("Symlink %s -> %s\n", source, target);
     fprintf (f, "CFLAGS=%s\n", conf.cflags);
 #endif
   if (*conf.ldflags != 0)
-    fprintf (f, "LDFLAGS=%s\n", conf.ldflags);
+    fprintf (f, "LDFLAGS+=%s\n", conf.ldflags);
 
   if (strcmp(conf.endianess, "UNKNOWN") != 0)
      sprintf (tmp_endian, " -DOSS_%s_ENDIAN", conf.endianess);
@@ -1170,7 +1170,7 @@ printf("Symlink %s -> %s\n", source, target);
 
       fprintf (f, "$(BINDIR)/%s:\t$(OBJECTS)\n", name);
       fprintf (f,
-	       "\t$(CC) $(CFLAGS) $(LIBRARIES) $(LDFLAGS) -s -o $(BINDIR)/%s $(OBJECTS) %s\n",
+	       "\t$(CC) $(CFLAGS) -o $(BINDIR)/%s $(OBJECTS) %s $(LIBRARIES) $(LDFLAGS)\n",
 	       name, extra_libraries);
       fprintf (f, "\n\n");
     }
@@ -1199,7 +1199,7 @@ printf("Symlink %s -> %s\n", source, target);
 
       fprintf (f, "$(SBINDIR)/%s:\t$(OBJECTS)\n", name);
       fprintf (f,
-	       "\t$(CC) $(CFLAGS) $(LIBRARIES) $(LDFLAGS) -s -o $(SBINDIR)/%s $(OBJECTS) %s\n",
+	       "\t$(CC) $(CFLAGS) -o $(SBINDIR)/%s $(OBJECTS) %s $(LIBRARIES) $(LDFLAGS)\n",
 	       name, extra_libraries);
       fprintf (f, "\n\n");
     }
@@ -1226,7 +1226,7 @@ printf("Symlink %s -> %s\n", source, target);
 		     obj_src[i], objdir, objects[i]);
 	  else
 	    fprintf (f,
-		     "\t$(CC) -c $(CFLAGS) $(OSFLAGS) $(LIBRARIES) $(INCLUDES) %s -o $(%s)/%s\n",
+		     "\t$(CC) -c $(CFLAGS) $(OSFLAGS) $(INCLUDES) %s -o $(%s)/%s $(LIBRARIES)\n",
 		     obj_src[i], objdir, objects[i]);
 	  fprintf (f, "\n");
 	}