summaryrefslogtreecommitdiff
blob: 6303edaeab9abbd06b3326a96fd1d8a3197ed3a1 (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
--- Makefile.orig	2006-11-23 10:01:20.000000000 -0800
+++ Makefile	2007-01-05 06:15:50.000000000 -0800
@@ -28,7 +28,7 @@
 DISTDIR = clthreads-$(VERSION)
 
 
-CPPFLAGS += -Wall -I. -fpic -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O2 
+CPPFLAGS += -Wall -I. -fpic -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
 LDLFAGS += 
 LDLIBS +=
 
@@ -36,22 +36,19 @@
 CLTHREADS_SO = libclthreads.so
 CLTHREADS_MAJ = $(CLTHREADS_SO).$(MAJVERS)
 CLTHREADS_MIN = $(CLTHREADS_MAJ).$(MINVERS)
-CLTHREADS_DEP = -lpthread
+CLTHREADS_DEP = -lpthread -lrt
 CLTHREADS_O = p_thread.o a_thread.o itc_mesg.o itc_ip1q.o itc_ctrl.o textmsg.o
 CLTHREADS_H = clthreads.h
 
 
 $(CLTHREADS_MIN): $(CLTHREADS_O)
-	g++ -shared $(LDFLAGS) -Wl,-soname,$(CLTHREADS_MAJ) -o $(CLTHREADS_MIN) $(CLTHREADS_O) $(CLTHREADS_DEP)
+	$(CXX) -shared $(LDFLAGS) -Wl,-soname,$(CLTHREADS_MAJ) -o $(CLTHREADS_MIN) $(CLTHREADS_O) $(CLTHREADS_DEP)
 
 
 install:	$(CLTHREADS_MIN)
-	/usr/bin/install -d $(PREFIX)/$(LIBDIR)
-	/usr/bin/install -m 644 $(CLTHREADS_H) $(PREFIX)/include
-	/usr/bin/install -m 755 $(CLTHREADS_MIN) $(PREFIX)/$(LIBDIR)
-	/sbin/ldconfig -n $(PREFIX)/$(LIBDIR)
-	ln -sf $(CLTHREADS_MIN) $(PREFIX)/$(LIBDIR)/$(CLTHREADS_SO)
-
+	/usr/bin/install -D $(CLTHREADS_H) $(DESTDIR)usr/include/$(CLTHREADS_H)
+	/usr/bin/install -D $(CLTHREADS_MIN) $(DESTDIR)$(CLTHREADS_LIBDIR)/$(CLTHREADS_MIN)
+	ln -sf $(CLTHREADS_MIN) $(DESTDIR)$(CLTHREADS_LIBDIR)/$(CLTHREADS_SO)
 
 clean:
 	/bin/rm -f *~ *.o *.a *.d *.so.*