--- makefile Wed Apr 15 09:28:48 1998 +++ /home/andy/tmp/wrk/makefile Mon Nov 2 14:49:09 1998 @@ -8,29 +8,54 @@ default : all # -# Install path +# C/C++ compiler # -INSTALL_LIB_DIR = /usr/lib -INSTALL_BIN_DIR = /usr/bin +CC?= gcc +CXX?= g++ # -# Target. +# C/C++ flags # +CFLAGS?= -O5 -g -Wall -c +CXXFLAGS?= -O5 -g -Wall -c +#CFLAGS= -fno-exceptions -O5 -g -Wall -c +#CXXFLAGS= -fno-exceptions -O5 -g -Wall -c -BINS = ptoc cganal -LIBS = libptoc.a libXbgi.a +# +# X Window System directory +# +X11BASE?= /usr/X11R6 + +# +# Local packages directory +# +LOCALBASE?= /usr/local + +# +# Installation directory +# +PREFIX?= $(LOCALBASE) + +# +# Config file +# +CONFIG_FILE?= $(LOCALBASE)/etc/ptoc.conf # -# Chose compiler You prefer. +# Install path # +INSTALL_LIB_DIR = $(PREFIX)/lib +INSTALL_BIN_DIR = $(PREFIX)/bin -#CC = cxx -CC = gcc -CCFLAGS = -O5 -g -Wall -c -#CCFLAGS = -fno-exceptions -O5 -g -Wall -c +# +# Target. +# + +BINS = ptoc cganal +LIBS = libptoc.a libXbgi.a -DEFINES = -INCLUDES = -I. +DEFINES = -DPREFIX=\"$(PREFIX)\" +INCLUDES = -I. -I$(X11BASE)/include YACC = bison -d -p zz LEX = flex -i -F -8 @@ -39,9 +64,9 @@ # Chose linker You prefer. # -LD = $(CC) +LD = $(CXX) #LDFLAGS = -non_shared -LDFLAGS = -static +#LDFLAGS = -static AR = ar @@ -66,10 +91,10 @@ # .cxx.o : - $(CC) $(CCFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< + $(CXX) $(CXXFLAGS) $(DEFINES) $(INCLUDES) -o $@ -c $< .c.o : - $(CC) $(CCFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< + $(CC) $(CXXFLAGS) $(DEFINES) $(INCLUDES) -o $@ -c $< # # Custom targets.