diff --git a/.gitignore b/.gitignore index 43f7a44..21d45e5 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ *.dump # No files compiled with default filename a.out +zapoctak diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4899d5d --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +CC:=gcc +WARNINGS:=-Wall -Wextra -Wpedantic +CCFLAGS:=$(WARNINGS) -g +LINKER:=gcc +LINKFLAGS:= + +all: zapoctak + +zapoctak: main.x + mv main.x zapoctak + +%.x: %.o + $(LINKER) -o $@ $(LINKFLAGS) $^ + +%.o: %.c + $(CC) -c -o $@ $(CCFLAGS) $< + +clean: + -rm -v *.x *.o *.dump a.out 2>/dev/null + +.PHONY: all clean