CC=gcc CFLAGS=-Wall -Wextra -pedantic -m64 -lsocket -lpthread -lrt SOSRC=array.c common.c SOBIN=libcommon.so libarray.so BIN=c1 c2 c3 c8 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 all: $(SOBIN) $(BIN) %: %.c $(CC) -o $@ $^ $(CFLAGS) -L. -lcommon -larray $(SOBIN): $(SOSRC) $(CC) -o $@ $^ $(CFLAGS) -fPIC -shared