21 lines
328 B
Makefile
21 lines
328 B
Makefile
|
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)
|