From 22b97d969cdff46a06a48a5bce7d183c4a877fb5 Mon Sep 17 00:00:00 2001 From: UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> Date: Wed, 29 May 2024 11:31:34 +0200 Subject: inital classes --- makefile | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 14da6dc..3b8b5d6 100644 --- a/makefile +++ b/makefile @@ -1,8 +1,25 @@ -main: main.o +CC = g++ +LD = g++ +RM = rm -f +CFLAGS = -g -std=c++17 +LFLAGS = +TARGET = main \ + Observer \ + Node \ + Net +SRCS := $(wildcard *.cpp) +OBJS := $(patsubst %.cpp,%.o, $(SRCS)) + +all: $(TARGET) + +%.o: %.cpp + $(CC) -c $(CFLAGS) $< -o $@ + +$(TARGET): $(OBJS) + $(LD) $^ $(LFLAGS) -o $@ clean: - git clean -fxdi + $(RM) $(TARGET) $(OBJS) -compile_commands.json: +compile_commands: clean compiledb make -Bn - -- cgit v1.2.3