LFLAGS = -lm CC = cc ifeq ($(shell uname),Linux) CFLAGS = -D_linux LFLAGS += -ansi CC = gcc endif ifeq ($(shell uname),SunOS) LFLAGS += -ansi CC = gcc endif ifeq ($(shell uname),HP-UX) CFLAGS = -g -Aa endif ifeq ($(shell uname),OSF1) CFLAGS = -std1 -D_dec endif all: TBtool OPTLIB = TBtool.a TBtool: TBtool.c $(OPTLIB) $(CC) $(CFLAGS) TBtool.c $(OPTLIB) -o TBtool $(LFLAGS) rm -f TBtool.o $(OPTLIB) : \ $(OPTLIB)(configFlagTst.o) \ $(OPTLIB)(parseCmd.o) \ $(OPTLIB)(TBtool.o) # pattern rules: .c.a: $(CC) -c $(CFLAGS) $< $(LFLAGS) ar rv $@ $*.o rm -f $*.o clean: \rm -f *.o *~ TBtool