Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37404928
en ru br
Репозитории ALT

Группа :: Науки/Математика
Пакет: coxeter3

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: coxeter-shared.patch
Скачать


--- makefile.orig	2018-02-26 14:57:36.000000000 -0700
+++ makefile	2019-08-12 11:47:02.304905154 -0600
@@ -1,14 +1,14 @@
 # sources contains a list of the source files (i.e., the .cpp files)
 sources := $(patsubst %.cpp,%.cpp,$(wildcard *.cpp))
 # there is one .o file for each .cpp file
-objects := $(patsubst %.cpp,%.o,$(wildcard *.cpp))
+objects := $(patsubst %.cpp,%.o,$(filter-out main.cpp, $(wildcard *.cpp)))
 # this is used to automatically generate the dependencies
 dependencies := $(patsubst %.cpp,%.d,$(wildcard *.cpp))
 
 globals = globals.h
 
 pflags = -c $(includedirs) -pg -O
-oflags = -c $(includedirs) -O -Wall
+oflags = -c $(includedirs) -fPIC $(CXXFLAGS)
 gflags = -c $(includedirs) -g
 
 cflags = $(gflags) # the default setting
@@ -22,18 +22,28 @@ ifdef profile
 	cflags = $(pflags)
 endif
 
-cc = g++
+EXENAME = coxeter
+LIBNAME = coxeter3
+LIBPREFIX = lib
+LIBDIR = $(libdir)
+LINKFLAGS = $(LDFLAGS) -shared -Wl,-soname,libcoxeter3.so.0
+LIBRARY = $(LIBPREFIX)$(LIBNAME).so.0.0.0
 
-all: coxeter #clean
+all: $(LIBRRAY) $(EXENAME)
 
-coxeter: $(objects)
-	$(cc) -o coxeter $(objects)
+$(LIBRARY): $(objects)
+	$(CXX) $(CXXFLAGS) $(LINKFLAGS) -o $@ $(objects)
+	ln -s $(LIBPREFIX)$(LIBNAME).so.0.0.0 $(LIBPREFIX)$(LIBNAME).so.0
+	ln -s $(LIBPREFIX)$(LIBNAME).so.0 $(LIBPREFIX)$(LIBNAME).so
+
+$(EXENAME): $(LIBRARY) main.o
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) main.o -o $@ -L. -l$(LIBNAME)
 
 clean:
 	rm -f $(objects)
 
 %.o:%.cpp
-	$(cc) $(cflags) $*.cpp
+	$(CXX) $(cflags) $*.cpp
 
 # dependencies --- these were generated automatically by make depend on my
 # system; they are explicitly copied for portability. Only local dependencies
@@ -43,7 +53,7 @@ clean:
 # contents of tmp in lieu of the dependencies listed here.
 
 %.d:%.cpp
-	@$(cc) -MM $*.cpp
+	@$(CXX) -MM $*.cpp
 depend: $(dependencies)
 
 affine.o: affine.cpp affine.h globals.h coxgroup.h coxtypes.h io.h list.h \
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin