ramik_dev/Makefile

25 lines
470 B
Makefile
Raw Permalink Normal View History

2024-03-27 16:36:54 -04:00
CC := g++
2024-06-15 15:15:13 -04:00
CFLAGS := -Wall -g -std=c++23 -I./include/
2024-03-27 16:36:54 -04:00
TARGET := server
2024-06-15 15:15:13 -04:00
LIBPATHS :=
LIBS := -lcurl
2024-03-27 16:36:54 -04:00
SRCS := $(wildcard *.cpp)
OBJS := $(patsubst %.cpp, %.o, $(SRCS))
all: $(TARGET)
$(TARGET): $(OBJS)
2024-06-15 17:09:46 -04:00
$(CC) $(LIBPATHS) -o $@ $^ $(LIBS)
2024-03-27 16:36:54 -04:00
%.o: %.cpp
$(CC) $(CFLAGS) -lpthread -c $<
clean:
rm -rf $(TARGET) *.o
all: run
2024-06-15 17:09:46 -04:00
build: $(TARGET)
run: build
2024-03-27 16:36:54 -04:00
./$(TARGET)
2024-06-15 15:15:13 -04:00
pch: include/crow_all.h.gch
include/crow_all.h.gch: include/crow_all.h
$(CC) $(CFLAGS) -lpthread -c $< -o $@