makefile demonstrates some neat ways to generalize things which should make maintenance easier...
CC = gcc SRCS = getopts.c OBJS = $(SRCS:.c=.o) LIBPATH = -L. INCLS = -I. CFLAGS = $(INCLS) -Wall -g TARGET = coreutil default: all all: $(TARGET) $(OBJS): Makefile coreutil.h $(TARGET): $(OBJS) $(TARGET).c $(CC) -o $(TARGET) $(TARGET).c $(OBJS) $(CFLAGS) clean: $(RM) *.o $(TARGET) core-- MattWalsh - 04 Apr 2002