diff options
| author | Clecio Jung | 2023-03-18 18:02:41 -0300 |
|---|---|---|
| committer | Clecio Jung | 2023-03-18 18:02:41 -0300 |
| commit | a3942b3241189a003414874a96732e373e63ccae (patch) | |
| tree | 32df11e16faaecb62b1b407ab49490dffe546cec /Makefile | |
| download | libini-a3942b3241189a003414874a96732e373e63ccae.tar.xz libini-a3942b3241189a003414874a96732e373e63ccae.tar.zst | |
Initial commit
Diffstat (limited to 'Makefile')
| -rwxr-xr-x | Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..134d617 --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +# ---------------------------------------- +# Compiler and linker options +# ---------------------------------------- + +# Name of the executables to be generated +EXEC := examples/ini_file_read \ + examples/ini_file_search \ + examples/ini_file_create + +# Library files +LIB_FILES := ini_file.c ini_file.h + +# Flags for compiler +CFLAGS := -W -Wall -Wextra -pedantic -Wconversion -Werror -flto -std=c89 -O2 + +# ---------------------------------------- +# Compilation and linking rules +# ---------------------------------------- + +all: $(EXEC) + +%: %.c $(LIB_FILES) Makefile + $(CC) $(filter %.c,$^) -o $@ $(CFLAGS) + +# ---------------------------------------- +# Script rules +# ---------------------------------------- + +clean: + $(RM) $(EXEC) + +remade: clean all + +.PHONY: all clean remade + +# ---------------------------------------- |
