summaryrefslogtreecommitdiff
blob: 4a8434bb7e7080bcb0f415700e95624db6c453a3 (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
--- src/Makefile.orig	2006-07-09 19:46:41.000000000 -0700
+++ src/Makefile	2006-07-09 19:51:00.000000000 -0700
@@ -2,11 +2,10 @@
 includedir=$(prefix)/include
 libdir=$(prefix)/lib
 
-ARCH := $(shell uname -m | sed -e s/i.86/i386/)
-CFLAGS := -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC
-SO_CFLAGS=-shared $(CFLAGS)
+CFLAGS += -nostdlib -nostartfiles -Wall -I. -fPIC
+SO_CFLAGS=-shared $(CFLAGS)
 L_CFLAGS=$(CFLAGS)
-LINK_FLAGS=
+LINK_FLAGS=-lgcc -lrt $(LDFLAGS)
 
 soname=libaio.so.1
 minor=0
@@ -48,7 +47,7 @@
 	ranlib libaio.a
 
 $(libname): $(libaio_sobjs) libaio.map
-	$(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS)
+	$(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname,$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS)
 
 install: $(all_targets)
 	install -D -m 644 libaio.h $(includedir)/libaio.h