Makefile
425 Bytes
#
# Makefile pour generer la bibliotheque de fonctions de communication
#
CC=gcc
CFLAGS=-W -Wall -Wextra
CLIBS=ar -rcs
LIB=libthrd.a
LDIR=../libs/
IDIR=../includes/
LDFLAGS=-lpthread
all: $(LIB)
$(LIB): threadSocket.o
rm -f $@
$(CLIBS) $(LDIR)$@ $^
ranlib $(LDIR)$@
rm -f *.o
threadSocket.o: threadSocket.c
$(CC) -o $@ -c $^ $(CFLAGS) $(LDFLAGS)
#
# La cible de nettoyage
#
clean:
rm -f *.o $(LDIR)$(LIB)