From 04b3b86afb54a8d5580cbc71ba4206510c4e1f66 Mon Sep 17 00:00:00 2001 From: romanschenk37 Date: Wed, 23 Mar 2022 16:27:18 +0100 Subject: [PATCH] Create Makefile Andrin --- .../work/modularize/Makefile Andrin | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 P04_Modularisieren_von_C_Code/work/modularize/Makefile Andrin diff --git a/P04_Modularisieren_von_C_Code/work/modularize/Makefile Andrin b/P04_Modularisieren_von_C_Code/work/modularize/Makefile Andrin new file mode 100644 index 0000000..174a96a --- /dev/null +++ b/P04_Modularisieren_von_C_Code/work/modularize/Makefile Andrin @@ -0,0 +1,25 @@ +SNP_SHARED_MAKEFILE := $(if $(SNP_SHARED_MAKEFILE),$(SNP_SHARED_MAKEFILE),"~/snp/shared.mk") + +TARGET := bin/triangle +SOURCES := src/triangle.c src/read.c src/rectang.c +TSTSOURCES := tests/tests.c +LIBS := -lm + +include $(SNP_SHARED_MAKEFILE) + +all: modul + +modul: triangle.o read.o rectang.o +gcc -o modul src/triangle.o src/read.o src/rectang.o + +clean: +rm -f *.o modul + +triangle.o: src/triangle.c Makefile +gcc -c src/triangle.c + +read.o: src/read.c src/read.h Makefile +gcc -c src/read.c + +rectang.o: src/rectang.c src/rectang.h Makefile +gcc -c src/rectang.c