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.old
2019-11-06 07:36:00 +01:00

47 lines
1.1 KiB
Makefile

CC := gcc -Wall -Wextra -Wpedantic -Werror -Iinclude -std=c11 -g -D_POSIX_C_SOURCE=200809L
all: build test-iftun ext-in ext-out tunnel64d
build:
-mkdir build
tunnel64d: build/tunnel64d.o build/iftun.a build/extremite.a
$(CC) $(CFLAGS) $^ -o $@
build/tunnel64d.o: src/tunnel64d.c src/iftun.h src/extremite.h
$(CC) $(CFLAGS) $< -c -o $@
ext-in: build/ext-in.o build/extremite.a build/iftun.a
$(CC) $(CFLAGS) $^ -o $@
ext-out: build/ext-out.o build/extremite.a build/iftun.a
$(CC) $(CFLAGS) $^ -o $@
build/ext-in.o: src/ext-in.c src/extremite.h src/iftun.h
$(CC) $(CFLAGS) $< -c -o $@
build/ext-out.o: src/ext-out.c src/extremite.h src/iftun.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 $@
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/*