# Compiler/Linker
CC = gcc
LD = gcc

# compiler/linker flags
CFLAGS = -g -Wall -D_GNU_SOURCE
LDFLAGS = -g

# files removal
RM = /bin/rm -f

# library to use when linking the main program
LIBS =

# program's object files
PROG_OBJS = main.o process.o socket.o

# program's executable
PROG = animenfo-client

# top-level rule
all: $(PROG)

$(PROG): $(PROG_OBJS)
	$(LD) $(LDFLAGS) $(PROG_OBJS) $(LIBS) -o $(PROG)

# compile C source files into object files.
%.o: %.c
	$(CC) $(CFLAGS) -c $<

# clean everything
clean:
	$(RM) $(PROG_OBJS) $(PROG)
