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
|
# Porting notes:
# For Solaris and other platforms where the logf function
# is missing from the math library, add the following line
# to the end of muscle.h:
# #define logf(x) ((float) log(x))
# Using -static increases the executable size and thus gives a very
# small increase in start time, but is more portable (the binding
# to dynamic libraries often breaks when a new library is released).
# On OSX, using -static gives the error "ld: can't locate file for: -lcrt0.o",
# this is fixed by deleting "-static" from the LDLIBS line.
CFLAGS = -O2 -funroll-loops -Winline -DNDEBUG=1
# LDLIBS = -lm -static
LDLIBS = -lm
OBJ = .o
EXE =
RM = rm -f
CP = cp
GPP = g++
LD = $(GPP) $(CFLAGS)
CPP = $(GPP) -c $(CFLAGS)
all: muscle
CPPSRC = $(sort $(wildcard *.cpp))
CPPOBJ = $(subst .cpp,.o,$(CPPSRC))
$(CPPOBJ): %.o: %.cpp
$(CPP) $< -o $@
muscle: $(CPPOBJ)
$(LD) -o muscle $(CPPOBJ) $(LDLIBS)
strip muscle
DESTDIR=""
install: muscle
if [ ! -x $(DESTDIR)/usr/bin ]; then mkdir -p $(DESTDIR)/usr/bin; fi
cp muscle $(DESTDIR)/usr/bin/muscle
install-doc: muscle.html
if [ ! -x $(DESTDIR)/usr/share/doc/muscle ]; then mkdir -p $(DESTDIR)/usr/share/doc/muscle; fi
if [ ! -x $(DESTDIR)/usr/share/doc/muscle-doc ]; then mkdir -p $(DESTDIR)/usr/share/doc/muscle-doc; fi
cp muscle.html $(DESTDIR)/usr/share/doc/muscle/
(cd $(DESTDIR)/usr/share/doc/muscle-doc/ && ln -s ../muscle/muscle.html* . )
clean:
$(RM) *.o make.err make.out
$(RM) muscle
|