Skip to content

Instantly share code, notes, and snippets.

@aladine
Last active May 30, 2020 07:20
Show Gist options
  • Save aladine/3af34c36bb552b9abdc7eff87d273a4e to your computer and use it in GitHub Desktop.
Save aladine/3af34c36bb552b9abdc7eff87d273a4e to your computer and use it in GitHub Desktop.
CXX = g++
CPPFLAGS = -Wall -std=c++11 -O2
LD_FLAGS =
FILE = mock/contest
SOURCES = $(FILE).cpp
OBJECTS = $(SOURCES:.cpp=.o)
EXE = $(FILE).out
all: $(SOURCES) $(EXE)
rm $(OBJECTS)
$(EXE): $(OBJECTS)
$(CXX) $(LD_FLAGS) $(OBJECTS) -o $@
clean:
rm $(FILE).out
run:
./$(EXE)
test:
./$(EXE) < $(FILE).txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment