$NetBSD: patch-aa,v 1.1.1.1 2002/11/09 09:23:24 rh Exp $ --- Makefile.orig Fri Nov 16 06:22:33 2001 +++ Makefile @@ -16,11 +16,11 @@ # and now for the language setting, # you can add LANG=LANG_EN or LANG=LANG_DE to the make arguments # Command line arguments to make override the default (which is in here) -LANG=LANG_DE +LANG=LANG_EN LANGUAGE=-DLANG=$(LANG) #decide between "main", "shlib" and "lib" -all: main +all: lib main #all: lib #all: shlib @@ -29,10 +29,9 @@ all: main # für systeme mit gcc oder egcs als compiler # choose your compiler, the example flags are for the gcc -CC = gcc -LIBTOOL = ar crus +#CC = gcc -COMPILERCFLAGS = -c -Wall +COMPILERCFLAGS = -c -Wall ${CFLAGS} ${CPPFLAGS} #COMPILERCFLAGS = -c -Wall -g #COMPILERCFLAGS = -c -Wall -g -DDEBUG @@ -41,14 +40,14 @@ COMPILERCFLAGS = -c -Wall #COMPILERCFLAGS= -c ##COMPILERCFLAGS= -g -c -LIBS = -lm +LIBS = ${LDFLAGS} -lm LFLAGS = -o #LFLAGS = -g -o #we have to define NO_GETTEXT, because the simple statist uses its own macro EXTRACFLAGS=-DNO_GETTEXT -CFLAGS= $(COMPILERCFLAGS) $(EXTRACFLAGS) $(LANGUAGE) $(STATISTX) +GCFLAGS= $(COMPILERCFLAGS) $(EXTRACFLAGS) $(LANGUAGE) $(STATISTX) #MAIN = $(HOME)/tools/statist MAIN=statist @@ -56,9 +55,12 @@ SH_LIB = libstatist.so.1.0.1 STAT_LIB = libstatist.a -OBJECTS = statist.o menue.o procs.o funcs.o data.o plot.o memory_handling.o +OBJECTS = statist.o ${STAT_LIB:.a=.la} LIB_OBJECTS = menue.o procs.o funcs.o data.o plot.o memory_handling.o +.c.o: + ${LIBTOOL} --mode=compile ${CC} ${GCFLAGS} -o ${.TARGET:.o=.lo} ${.IMPSRC} + main: $(MAIN) check: main @@ -73,32 +75,26 @@ lib: $(STAT_LIB) $(MAIN) : $(OBJECTS) Makefile - $(CC) $(LFLAGS) $(MAIN) $(OBJECTS) $(LIBS) + ${LIBTOOL} --mode=link ${CC} ${LFLAGS} ${MAIN} ${OBJECTS:.o=.lo} ${LIBS} # change AB: $(SH_LIB): $(LIB_OBJECTS) Makefile $(CC) -shared $(LIB_OBJECTS) -o $(SH_LIB) $(STAT_LIB): $(LIB_OBJECTS) Makefile - $(LIBTOOL) $(STAT_LIB) $(LIB_OBJECTS) + ${LIBTOOL} --mode=link ${CC} -o ${STAT_LIB:.a=.la} ${LIB_OBJECTS:.o=.lo} -rpath ${PREFIX}/lib -version-info 1:0 statist.o : statist.c statist.h menue.h data.h funcs.h - $(CC) $(CFLAGS) statist.c menue.o : menue.c menue.h procs.h data.h statist.h - $(CC) $(CFLAGS) menue.c procs.o : procs.c procs.h funcs.h statist.h - $(CC) $(CFLAGS) procs.c funcs.o : funcs.c funcs.h statist.h - $(CC) $(CFLAGS) funcs.c data.o : data.c data.h statist.h - $(CC) $(CFLAGS) data.c plot.o : plot.c plot.h statist.h funcs.h - $(CC) $(CFLAGS) plot.c clean: