2023-01-11 13:22:36 +01:00
|
|
|
# Docu
|
|
|
|
#
|
|
|
|
#$@ is the name of the file to be made
|
|
|
|
#$? is the names of the changed dependents
|
|
|
|
#$< the name of the related file that caused the action
|
|
|
|
#$* the prefix shared by target and dependent files
|
|
|
|
#
|
|
|
|
# Others
|
|
|
|
RM = /bin/rm -f
|
|
|
|
#
|
|
|
|
# Source, Executable, Includes, Library Defines
|
|
|
|
EXE = main
|
|
|
|
#
|
|
|
|
# Compiler, Linker Defines
|
|
|
|
CC = /usr/bin/gcc
|
|
|
|
#
|
|
|
|
all: main.o
|
|
|
|
$(CC) main.c -L/usr/lib/x86_64-linux-gnu -ljansson -Wall -o $(EXE)
|
|
|
|
#
|
2023-01-11 13:51:41 +01:00
|
|
|
#Compile your program with -g to include debugging information so that Memcheck's error messages include exact line numbers.
|
|
|
|
#-O0 means no optmization
|
|
|
|
#-g - adds debugging symbols to executable
|
|
|
|
debug: main.o
|
|
|
|
$(CC) main.c -L/usr/lib/x86_64-linux-gnu -ljansson -Wall -o $(EXE) -O0 -g
|
|
|
|
#
|
2023-01-11 13:22:36 +01:00
|
|
|
main.o:
|
|
|
|
$(CC) -c main.c
|
|
|
|
# Clean Up Objects, Exectuables, Dumps out of source directory
|
|
|
|
clean:
|
|
|
|
$(RM) *.o $(EXE) *~
|