Skip to content

Instantly share code, notes, and snippets.

@whynotavailable
Last active June 6, 2019 16:30
Show Gist options
  • Save whynotavailable/48d09a6dfbf0056d40a1e6a0a710232d to your computer and use it in GitHub Desktop.
Save whynotavailable/48d09a6dfbf0056d40a1e6a0a710232d to your computer and use it in GitHub Desktop.
PROG=program
CC=g++
EXT=cpp
CPPFLAGS=
LDFLAGS=
SRC=$(wildcard *.$(EXT))
OBJS=$(SRC:.$(EXT)=.o)
$(PROG): $(OBJS)
$(CC) -o $(PROG) $(OBJS) $(LDFLAGS)
.$(EXT).o:
$(CC) $(CPPFLAGS) -c $< -o $@
clean:
rm -f $(PROG) $(OBJS)
run: $(PROG)
./program
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment