aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorUnavailableDev <69792062+UnavailableDev@users.noreply.github.com>2024-05-29 11:31:34 +0200
committerUnavailableDev <69792062+UnavailableDev@users.noreply.github.com>2024-05-29 11:31:34 +0200
commit22b97d969cdff46a06a48a5bce7d183c4a877fb5 (patch)
treeb6134d1afddbd20f7b4f4a731956271e5aa1e422 /makefile
parentd062ae0e598ddc38b1e683a2f5169a0f48e5611e (diff)
inital classes
Diffstat (limited to 'makefile')
-rw-r--r--makefile25
1 files changed, 21 insertions, 4 deletions
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
-