This repository has been archived on 2024-12-13. You can view files and clone it, but cannot push or open issues or pull requests.
progress/Makefile

35 lines
551 B
Makefile
Raw Normal View History

2024-01-18 11:11:09 +01:00
LDLIBS := -lscterm -lm -lscscreensaver
2021-12-11 23:45:15 +01:00
BIN := $(shell basename $$(pwd))
SRCS := $(wildcard *.cpp)
OBJS := $(SRCS:.cpp=.o)
DEPS := $(SRCS:.cpp=.d)
CXX ?= g++
RM := /bin/rm -f
CXXFLAGS += -Wshadow -Wall -Wpedantic -Wextra -g -std=c++17
ifeq ($(DEBUG),1)
CXXFLAGS += -D DEBUG -O0
else
CXXFLAGS += -D NDEBUG -O3
endif
.PHONY: all clean
all: $(BIN)
$(BIN): $(OBJS) $(DEPS)
2024-03-28 15:25:09 +01:00
$(CXX) $(LDFLAGS) -o $(BIN) $(OBJS) $(LDLIBS)
2021-12-11 23:45:15 +01:00
%.o: %.cpp %.d
$(CXX) $(CXXFLAGS) -MMD -MP -MT $@ -MF $*.d -c $<
-include *.d
%.d: ;
clean:
$(RM) $(OBJS) $(DEPS) $(BIN)