$NetBSD: patch-aa,v 1.1.1.1 2005/01/12 11:52:10 agc Exp $ --- Makefile.orig 2003-03-10 13:54:28.000000000 +0100 +++ Makefile 2004-08-25 15:04:13.000000000 +0200 @@ -3,21 +3,22 @@ SRC = wmSMPmon.c ../wmgeneral/wmgeneral.c EXE = wmSMPmon -OBJ = $(SRC:.c=.o) -CFLAGS = -Wall -O3 -m486 -LIB = -L/usr/X11R6/lib -lXpm -lXext -lX11 +OBJ = wmSMPmon.o ../wmgeneral/wmgeneral.o +CFLAGS = -Wall -O3 +LIB = -L${X11BASE}/lib -Wl,-R${X11BASE}/lib -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -lXpm -lXext -lX11 +INC = -I${X11BASE}/include -I${LOCALBASE}/include INSTALL = /usr/bin/install CC = gcc -all: $(OBJ) - $(CC) -o $(EXE) $(OBJ) $(LIB) +all: ${OBJ} + ${CC} -o ${EXE} ${OBJ} ${INC} ${LIB} -$(OBJ): %.o : %.c - $(CC) $(CFLAGS) -c -o $@ $< +.c.o: + ${CC} ${CFLAGS} ${INC} -c -o $@ $< clean: - rm -rf $(EXE) + rm -rf ${EXE} rm -rf *.o rm -rf ../wmgeneral/*.o install: - $(INSTALL) $(EXE) /usr/local/bin/ + ${INSTALL} ${EXE} ${LOCALBASE}/bin