--- source/Makefile 2009-03-01 12:19:16.000000000 +0100 +++ source/Makefile.new 2009-03-01 14:45:35.000000000 +0100 @@ -3,17 +3,18 @@ #CC=gcc CC=cc -INCLUDE_DIR=/usr/local/include +INCLUDE_DIR=/usr/include LIB_DIR=/usr/local/lib #LIB_FILE=libcgraph.sl LIB_FILE=libcgraph.a +LIB_FILE_SO=libcgraph.so # NEXTSTEP/OPENSTEP multiple architecture compile flags #ARCHS= #ARCHS=-arch i386 -arch m68k -arch sparc -arch hppa -ARCHS=-arch i386 -arch m68k +#ARCHS=-arch i386 -arch m68k #CCFLAGS = -c -O -fpic -I/usr/include/X11R5 @@ -33,15 +34,18 @@ install: # mkdir -p $(LIB_DIR) # mkdir -p $(INCLUDE_DIR) - cp $(LIB_FILE) $(LIB_DIR) - ranlib -s $(LIB_DIR)/$(LIB_FILE) - cp cgraph.h $(INCLUDE_DIR) + mkdir -p $(DESTDIR)/$(LIB_DIR)/ + mkdir -p $(DESTDIR)/$(INCLUDE_DIR)/cgraph/ + cp $(LIB_FILE) $(DESTDIR)/$(LIB_DIR)/ + ranlib $(DESTDIR)/$(LIB_DIR)/$(LIB_FILE) + cp cgraph.h $(DESTDIR)/$(INCLUDE_DIR)/cgraph/ # For NeXT $(LIB_FILE): $(OBJS) Makefile rm -f $(LIB_FILE) ar r $(LIB_FILE) $(OBJS) - ranlib -s $(LIB_FILE) + ranlib $(LIB_FILE) + $(CC) -shared $(CCFLAGS) $(LDFLAGS) -Wl,-soname,$(LIB_FILE_SO).0 -o $(LIB_FILE_SO).0.0.0 $(OBJS) -lc -lm # For Unix #$(LIB_FILE): $(OBJS) Makefile @@ -49,92 +52,92 @@ cg_newfuncs.o: cglobals.h cgaxes.h cgfont.h - $(CC) $(CCFLAGS) $(ARCHS) cg_newfuncs.c + $(CC) $(CCFLAGS) $(ARCHS) -c cg_newfuncs.c cgprint.o: cgprint.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) cgprint.c + $(CC) $(CCFLAGS) $(ARCHS) -c cgprint.c cgsave.o: cgsave.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) cgsave.c + $(CC) $(CCFLAGS) $(ARCHS) -c cgsave.c gaxlabel.o: gaxlabel.c cglobals.h cgaxes.h - $(CC) $(CCFLAGS) $(ARCHS) gaxlabel.c + $(CC) $(CCFLAGS) $(ARCHS) -c gaxlabel.c gbott.o: gbott.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) gbott.c + $(CC) $(CCFLAGS) $(ARCHS) -c gbott.c bginit.o: bginit.c cglobals.h cgaxes.h cgfont.h version.h cgraph.h - $(CC) $(CCFLAGS) $(ARCHS) bginit.c + $(CC) $(CCFLAGS) $(ARCHS) -c bginit.c bgstart.o: bgstart.c cglobals.h cgaxes.h cgfont.h version.h - $(CC) $(CCFLAGS) $(ARCHS) bgstart.c + $(CC) $(CCFLAGS) $(ARCHS) -c bgstart.c gmark.o: gmark.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) gmark.c + $(CC) $(CCFLAGS) $(ARCHS) -c gmark.c glcmp.o: glcmp.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) glcmp.c + $(CC) $(CCFLAGS) $(ARCHS) -c glcmp.c gxaxs.o: gxaxs.c cglobals.h cgaxes.h cgfont.h - $(CC) $(CCFLAGS) $(ARCHS) gxaxs.c + $(CC) $(CCFLAGS) $(ARCHS) -c gxaxs.c gxlog.o: gxlog.c cglobals.h cgaxes.h cgfont.h - $(CC) $(CCFLAGS) $(ARCHS) gxlog.c + $(CC) $(CCFLAGS) $(ARCHS) -c gxlog.c gyaxs.o: gyaxs.c cgaxes.h cgfont.h cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) gyaxs.c + $(CC) $(CCFLAGS) $(ARCHS) -c gyaxs.c gylog.o: gylog.c cglobals.h cgaxes.h cgfont.h - $(CC) $(CCFLAGS) $(ARCHS) gylog.c + $(CC) $(CCFLAGS) $(ARCHS) -c gylog.c gtext.o: gtext.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) gtext.c + $(CC) $(CCFLAGS) $(ARCHS) -c gtext.c gtrnc.o: gtrnc.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) gtrnc.c + $(CC) $(CCFLAGS) $(ARCHS) -c gtrnc.c gmesh.o: gmesh.c cglobals.h cgaxes.h - $(CC) $(CCFLAGS) $(ARCHS) gmesh.c + $(CC) $(CCFLAGS) $(ARCHS) -c gmesh.c gstyl.o: gstyl.c cgaxes.h cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) gstyl.c + $(CC) $(CCFLAGS) $(ARCHS) -c gstyl.c gwdth.o: gwdth.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) gwdth.c + $(CC) $(CCFLAGS) $(ARCHS) -c gwdth.c gfont.o: gfont.c cglobals.h cgfont.h PS_font_names.h - $(CC) $(CCFLAGS) $(ARCHS) gfont.c + $(CC) $(CCFLAGS) $(ARCHS) -c gfont.c grmle.o: grmle.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) grmle.c + $(CC) $(CCFLAGS) $(ARCHS) -c grmle.c gmlin.o: gmlin.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) gmlin.c + $(CC) $(CCFLAGS) $(ARCHS) -c gmlin.c gcord.o: gcord.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) gcord.c + $(CC) $(CCFLAGS) $(ARCHS) -c gcord.c gorig.o: gorig.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) gorig.c + $(CC) $(CCFLAGS) $(ARCHS) -c gorig.c bgdash.o: bgdash.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) bgdash.c + $(CC) $(CCFLAGS) $(ARCHS) -c bgdash.c gprim.o: gprim.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) gprim.c + $(CC) $(CCFLAGS) $(ARCHS) -c gprim.c grset.o: grset.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) grset.c + $(CC) $(CCFLAGS) $(ARCHS) -c grset.c ggraycolor.o: ggraycolor.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) ggraycolor.c + $(CC) $(CCFLAGS) $(ARCHS) -c ggraycolor.c gstrk.o: gstrk.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) gstrk.c + $(CC) $(CCFLAGS) $(ARCHS) -c gstrk.c bgshow.o: bgshow.c cglobals.h - $(CC) $(CCFLAGS) $(ARCHS) bgshow.c + $(CC) $(CCFLAGS) $(ARCHS) -c bgshow.c clean: rm -f *.o *.a *.sl