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
415 B
24 lines
415 B
SOURCE:= src/*.c
|
|
TEST_SOURCE:= src/test/*.c
|
|
INCLUDE:= include/
|
|
CFLAGS:= -Wall -g --std=c11
|
|
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)/$@
|