diff --git a/.gitignore b/.gitignore index 03816eb..3ee1569 100644 --- a/.gitignore +++ b/.gitignore @@ -175,7 +175,6 @@ CMakeCache.txt CMakeFiles CMakeScripts Testing -Makefile cmake_install.cmake install_manifest.txt compile_commands.json diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8b37ee4 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +CC := gcc +CCFLAGS := -pedantic -std=c99 +OBJ := main.o +TARGET := main + +all: main use + +main: $(OBJ) + $(CC) $(CCFLAGS) $(OBJ) -o $(TARGET) + ./main + +$(OBJ): main.c + $(CC) $(CCFLAGS) -c main.c -o $(OBJ) + +use: use.o + $(CC) $(CCFLAGS) use.o -o use + +use.o: use.c + $(CC) $(CCFLAGS) -c use.c -o use.o + +.PHONY: clean +clean: + rm -f $(TARGET) $(OBJ) use.o use