From 492a2b5b87c1780b15107f804289d6965537e25f Mon Sep 17 00:00:00 2001 From: Orestis <orestis.malaspinas@pm.me> Date: Thu, 18 Nov 2021 09:42:17 +0100 Subject: [PATCH] added Makefile for CI --- source_codes/piles/.gitignore | 6 ++++++ source_codes/piles/Makefile | 27 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 source_codes/piles/.gitignore create mode 100644 source_codes/piles/Makefile diff --git a/source_codes/piles/.gitignore b/source_codes/piles/.gitignore new file mode 100644 index 0000000..4174122 --- /dev/null +++ b/source_codes/piles/.gitignore @@ -0,0 +1,6 @@ +pile_ptr_int.o +eval_post +pile_ptr_int.o +eval_post.o +pile_array_int.o +pile_ptr_int_skel.o diff --git a/source_codes/piles/Makefile b/source_codes/piles/Makefile new file mode 100644 index 0000000..e0b8258 --- /dev/null +++ b/source_codes/piles/Makefile @@ -0,0 +1,27 @@ +CC:=gcc +# SAN:=-fsanitize=address +CFLAGS:=-Wall -Wextra -pedantic -g $(SAN) +LDFLAGS:=-lm $(SAN) +SOURCES := $(wildcard *.c) +OBJECTS := $(patsubst %.c, %.o, $(SOURCES)) + +all: eval_post $(OBJECTS) + +eval_post: eval_post.c pile_ptr_int.o + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) + @echo $@ >> .gitignore + @echo *.o >> .gitignore + +%.o: %.c + $(CC) $(CFLAGS) -c $< -o $@ + @echo $@ >> .gitignore + +pile_ptr_int_skel.o: pile_ptr_int.h +pile_ptr_int.o: pile_ptr_int.h +pile_array_int.o: pile_array_int.h + +.PHONY: clean all + +clean: + rm -f *.o eval_post .gitignore + -- GitLab