You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

25 lines
411 B

CC=gcc
SOURCES=$(wildcard *.c)
OBJECTS=$(SOURCES:.c=.o)
EXECUTABLE=ai.so
CFLAGS=-fPIC -g -std=gnu99 -Wall -Wextra
LDFLAGS=-shared
all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) -o $@ $^
for i in $(shell seq 1 6) ; do cp $(EXECUTABLE) ai$$i.so ; done
%.o: %.c $(wildcard *.h)
$(CC) $(CFLAGS) -c -o $@ $<
.PHONY: clean mrproper all
clean:
rm -f *.o
mrproper: clean
rm -f $(EXECUTABLE)