Apply - Makefiles
Given the following Makefile:
CC = /usr/bin/cc
CFLAGS = -W -O
LIBS = -lm
server: server.c create_socket.o
$(CC) $(CFLAGS) server.c create_socket.o $(LIBS)
client: client.c++ make_connection.o
$(CC) $(CFLAGS) client.c++ create_socket.o $(LIBS)
create_socket.o: create_socket.c
$(CC) $(CFLAGS) -c create_socket.c -o create_socket.o
make_connection.o: make_connection.c
$(CC) $(CFLAGS) -c make_connection.c -o make_connection.o
clean:
rm server client *.o
|