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.
 
 
 
 

24 lines
346 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 $@ $^
%.o: %.c $(wildcard *.h)
$(CC) $(CFLAGS) -c -o $@ $<
.PHONY: clean mrproper all
clean:
rm -f *.o
mrproper: clean
rm -f $(EXECUTABLE)