24 lines
433 B
Makefile
24 lines
433 B
Makefile
CC := gcc -Wall -Wextra -Wpedantic -Werror -Iinclude -std=c11 -g
|
|
|
|
|
|
all: build test-iftun
|
|
|
|
build:
|
|
-mkdir build
|
|
|
|
test-iftun: build/test-iftun.o build/iftun.a
|
|
$(CC) $(CFLAGS) $^ -o $@
|
|
|
|
build/test-iftun.o: src/test-iftun.c src/iftun.h
|
|
$(CC) $(CFLAGS) $< -c -o $@
|
|
|
|
build/iftun.a: build/iftun.o
|
|
ar rcs $@ $<
|
|
|
|
build/iftun.o: src/iftun.c src/iftun.h
|
|
$(CC) $(CFLAGS) $< -c -o $@
|
|
|
|
clean:
|
|
-rm -f $(BUILD_DIR)/*.o
|
|
-rm -f $(BUILD_DIR)/*.d
|