File libSGE-030809-parallel_make.patch of Package libSGE
Index: Makefile
===================================================================
--- Makefile.orig
+++ Makefile
@@ -10,19 +10,19 @@ API_VER = 0
OBJECTS=sge_surface.o sge_primitives.o sge_tt_text.o sge_bm_text.o sge_misc.o sge_textpp.o sge_blib.o sge_rotation.o sge_collision.o sge_shape.o
-all: config $(OBJECTS)
+all: libSGE.so
-$(OBJECTS): %.o:%.cpp %.h #Each object depends on thier .cpp and .h file
+$(OBJECTS): %.o:%.cpp %.h sge_config.h #Each object depends on thier .cpp and .h file
$(CXX) $(CFLAGS) -c $<
-shared: all
+libSGE.so: $(OBJECTS)
$(CXX) $(CFLAGS) -Wl,-soname,libSGE.so.$(API_VER) -fpic -fPIC -shared -o libSGE.so $(OBJECTS) $(LIBS)
-shared-strip: shared
+shared-strip: libSGE.so
@strip libSGE.so
# Building a dll... I have no idea how to do this, but it should be something like below.
-dll: config $(OBJECTS)
+dll: sge_config.h $(OBJECTS)
dlltool --output-def SGE.def $(OBJECTS)
dllwrap --driver-name $(CXX) -o SGE.dll --def SGE.def --output-lib libSGE.a --dllname SGE.dll $(OBJECTS) $(LIBS)
@@ -32,7 +32,7 @@ dll-strip: dll
clean:
@rm -f *.o *.so *.a *.dll *.def
-config:
+sge_config.h:
@echo "/* SGE Config header (generated automatically) */" >sge_config.h
@echo "#define SGE_VER $(SGE_VER)" >>sge_config.h
ifeq ($(C_COMP),y)
@@ -69,7 +69,7 @@ endif
@echo ""
endif
-install: shared
+install: libSGE.so
@mkdir -p $(DESTDIR)$(PREFIX_H)
install -c -m 644 sge*.h $(DESTDIR)$(PREFIX_H)
@mkdir -p $(DESTDIR)$(PREFIX)/lib