21 lines
328 B
Makefile
Executable File
21 lines
328 B
Makefile
Executable File
CC := g++
|
|
CFLAGS := -Wall -g -std=c++23
|
|
TARGET := server
|
|
|
|
LIBPATHS :=
|
|
LIBS :=
|
|
|
|
SRCS := $(wildcard *.cpp)
|
|
OBJS := $(patsubst %.cpp, %.o, $(SRCS))
|
|
|
|
all: $(TARGET)
|
|
$(TARGET): $(OBJS)
|
|
$(CC) $(LIBPATHS) $(LIBS) -o $@ $^
|
|
%.o: %.cpp
|
|
$(CC) $(CFLAGS) -lpthread -c $<
|
|
clean:
|
|
rm -rf $(TARGET) *.o
|
|
all: run
|
|
run: $(TARGET)
|
|
./$(TARGET)
|