SSE2033F18.Makefile History

Hide minor edits - Show changes to output

December 09, 2018, at 08:38 AM by 115.145.211.191 -
Added lines 1-23:
CC = gcc
CFLAGS = -g -O -Wall

CSRCS = server.c db.c
TARGET = server
OBJECTS = $(CSRCS:.c=.o)

all : $(TARGET) client

$(TARGET) : $(OBJECTS)
$(CC) -pthread $(OBJECTS) -o $@

client: client.o
$(CC) -o client client.o

.c.o:
$(CC) $(CFLAGS) -c $< -o $@

client.o: client.c
$(CC) -c -o client.o client.c

clean:
rm -f $(OBJECTS) $(TARGET) client.o client