improved Makefile and use debugging flags

This commit is contained in:
bjoernf 2023-12-29 06:30:52 +01:00
parent 315d127717
commit 78a07b128f

View File

@ -1,5 +1,5 @@
CC = gcc CC = gcc
CFLAGS = -Wall CFLAGS = -Wall -g -O0
LDFLAGS = -luuid LDFLAGS = -luuid
# List of all source files (assuming they're all in the same directory) # List of all source files (assuming they're all in the same directory)
@ -12,7 +12,7 @@ EXECUTABLE = "icscli"
# linking # linking
$(EXECUTABLE): $(OBJ_FILES) $(EXECUTABLE): $(OBJ_FILES)
gcc -Wall $(OBJ_FILES) -o $(EXECUTABLE) $(LDFLAGS) gcc $(CFLAGS) $(OBJ_FILES) -o $(EXECUTABLE) $(LDFLAGS)
main.o: main.c main.o: main.c
$(CC) $(CFLAGS) -c $< $(CC) $(CFLAGS) -c $<
@ -27,7 +27,7 @@ install: $(EXECUTABLE)
.PHONY:clean .PHONY:clean
clean: clean:
-rm $(EXECUTABLE) *.o -rm -f $(EXECUTABLE) *.o
.PHONY:uninstall .PHONY:uninstall
uninstall: uninstall: