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
416 B

6 years ago
SOURCE:= src/*.c
TEST_SOURCE:= src/test/*.c
INCLUDE:= include/
CFLAGS:= -Wall -g --std=c11
6 years ago
OBJ:= obj
BUILD:= build
LFLAGS:= -L./$(BUILD) -lse
all: clean libse test
clean:
rm -f $(BUILD)/*
rm -f $(OBJ)/*
libse:
gcc -c $(SOURCE) -I$(INCLUDE) $(CFLAGS)
mv *.o $(OBJ)/
ar rcs $(BUILD)/$@.a $(OBJ)/*.o
ranlib $(BUILD)/$@.a
test:
gcc $(TEST_SOURCE) -I$(INCLUDE) $(CFLAGS) -o $(BUILD)/$@ $(LFLAGS)
$(BUILD)/$@
5 years ago