This repository has been archived on 2019-11-14. You can view files and clone it, but cannot push or open issues or pull requests.
rip-vm2/partage/Makefile

42 lines
871 B
Makefile
Raw Normal View History

2019-10-25 18:07:02 +02:00
CC := gcc -Wall -Wextra -Wpedantic -Werror -Iinclude -std=c11 -g
2019-10-25 11:37:27 +02:00
2019-10-25 23:53:43 +02:00
all: build test-iftun ext-in ext-out
2019-10-25 11:37:27 +02:00
2019-10-25 18:07:02 +02:00
build:
-mkdir build
2019-10-25 11:37:27 +02:00
2019-10-25 23:53:43 +02:00
ext-in: build/ext-in.o build/extremite.a
$(CC) $(CFLAGS) $^ -o $@
ext-out: build/ext-out.o build/extremite.a
$(CC) $(CFLAGS) $^ -o $@
build/ext-in.o: src/ext-in.c src/extremite.h
$(CC) $(CFLAGS) $< -c -o $@
build/ext-out.o: src/ext-out.c src/extremite.h
$(CC) $(CFLAGS) $< -c -o $@
build/extremite.a: build/extremite.o
ar rcs $@ $<
build/extremite.o: src/extremite.c src/extremite.h
$(CC) $(CFLAGS) $< -c -o $@
2019-10-25 18:07:02 +02:00
test-iftun: build/test-iftun.o build/iftun.a
$(CC) $(CFLAGS) $^ -o $@
2019-10-25 11:37:27 +02:00
2019-10-25 18:07:02 +02:00
build/test-iftun.o: src/test-iftun.c src/iftun.h
$(CC) $(CFLAGS) $< -c -o $@
2019-10-25 11:37:27 +02:00
2019-10-25 18:07:02 +02:00
build/iftun.a: build/iftun.o
ar rcs $@ $<
2019-10-25 11:37:27 +02:00
2019-10-25 18:07:02 +02:00
build/iftun.o: src/iftun.c src/iftun.h
$(CC) $(CFLAGS) $< -c -o $@
2019-10-25 11:37:27 +02:00
clean:
-rm -f $(BUILD_DIR)/*.o
-rm -f $(BUILD_DIR)/*.d