diff options
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 25 |
1 files changed, 21 insertions, 4 deletions
@@ -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 - |