aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
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
-