Hi
I'm trying to figure out how to make the makefile for the following.
I have bookie.c and client.c which should be compiled into separated executables.
I also have one helper.h and helper.c that are needed in both booie.c and client.c
How should I go about for the makefile?
Is it possible to compile the whole thing in just one make file?
How do put the linkage of the header in the makefile?
So far my makefile is:
Code:FLAGS = -Wall -g -std=c99 CC = gcc PROG = Client OBJS = semlib.o helper.o client.o all: ${PROG} clean: rm ${OBJS} ${PROG} *~ ${PROG}: ${OBJS} ${CC} ${FLAGS} ${OBJS} -o $@ .c.o: ${CC} ${FLAGS} $< -c ########################## semlib.o: semlib.c helper.o: helper.c client.o: client.c