Date: Tue, 15 Feb 2000 21:55:32 +0000 From: George Cox <gjvc@extremis.demon.co.uk> To: Johan Pettersson <johpe159@student.liu.se> Cc: FreeBSD questions <questions@FreeBSD.ORG> Subject: Re: Makefile Message-ID: <20000215215532.D503@extremis.demon.co.uk> In-Reply-To: <20000214223927.A2698@b41.ryd.student.liu.se>; from johpe159@student.liu.se on Mon, Feb 14, 2000 at 10:39:27PM %2B0100 References: <20000214223927.A2698@b41.ryd.student.liu.se>
next in thread | previous in thread | raw e-mail | index | archive | help
On 14/02 22:39, Johan Pettersson wrote: > Have problem whith a makefile =/ Have read GNU Make but can't solve the > problem. Following line work: > cc -L/home/johpe/projekt/cn/src lab_2.c -lcable -lnsl Try this Makefile. I assume you are using gcc. ---8<--- CC = cc CFLAGS = -Wall -pipe SRCS = lab_2.c OBJS = $(SRCS:.c=.o) LIBS = -lcable -lnsl BIN = lab2 # the executable depends on all the objects $(BIN) : $(OBJS) $(CC) $(BIN) $(OBJS) $(LIBS) # each object depends on its source file %.o: %c $(CC) $(CFLAGS) -c $< -o $@ ---8<--- gjvc -- [gjvc] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000215215532.D503>