--- src/makefile.linux Sun Mar 5 03:46:18 2006
+++ src/makefile.linux Sun Mar 5 03:51:02 2006
@@ -1,19 +1,18 @@
-CC = gcc
+CC? = ${CC}
AR = ar cru
RANLIB = ranlib
MAJOR_VERSION = 1
MINOR_VERSION = 6
PATCH_LEVEL = 8
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
-LIBDIR = /usr/local/lib
-INCDIR = /usr/local/include
+LIBDIR = ${PREFIX}/lib
+INCDIR = ${PREFIX}/include
INCLUDE = -I../include
OUTPUT = libNL.so.$(VERSION)
LIBNAME = NL
STATIC = libNL.a
-OPTFLAGS = -funroll-all-loops -ffast-math -fomit-frame-pointer -O2 -D_GNU_SOURCE -D_REENTRANT
-CFLAGS = -Wall -fPIC $(INCLUDE) $(OPTFLAGS)
-LIBFLAGS = -shared -Wl,-soname,NL.so.$(MAJOR_VERSION).$(MINOR_VERSION) -rdynamic -lpthread
+CFLAGS? = ${CFLAGS} -Wall -fPIC $(INCLUDE)
+LIBFLAGS = -shared -Wl,-soname,NL.so.$(MAJOR_VERSION).$(MINOR_VERSION) -rdynamic ${LDFLAGS}
OBJECTS = crc.o errorstr.o nl.o sock.o group.o loopback.o err.o thread.o mutex.o condition.o nltime.o
all: $(OBJECTS)
@@ -37,20 +36,11 @@
cp $(OUTPUT) $(LIBDIR)
cp $(STATIC) $(LIBDIR)
chmod 755 $(LIBDIR)/$(OUTPUT)
- ln -s $(LIBDIR)/$(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so.$(MAJOR_VERSION).$(MINOR_VERSION)
ln -s $(LIBDIR)/$(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so.$(MAJOR_VERSION)
ln -s $(LIBDIR)/$(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so
ln -s $(LIBDIR)/$(OUTPUT) $(LIBDIR)/$(LIBNAME).so
cp ../include/nl.h $(INCDIR)/nl.h
chmod 644 $(INCDIR)/nl.h
- @echo ""
- @echo "*************************************************"
- @echo "* Installed HawkNL. *"
- @echo "* Remember to run /sbin/ldconfig before using *"
- @echo "* the library, you may also want to check that *"
- @echo "* $(LIBDIR) is included in /etc/ld.so.conf *"
- @echo "* You must be root to run ldconfig. *"
- @echo "*************************************************"
uninstall:
rm -f $(LIBDIR)/$(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so.$(MAJOR_VERSION).$(MINOR_VERSION)
syntax highlighted by Code2HTML, v. 0.9.1