Skip to content

Instantly share code, notes, and snippets.

@equinoxel

equinoxel/Makefile

Created Dec 20, 2015
Embed
What would you like to do?
.PHONY: depend clean
all: $(MAIN)
@echo Polymorph binary has been compiled
$(MAIN): $(OBJS)
$(CXX) $(CXXFALGS) $(INCLUDES) -o $(MAIN) $(OBJS) $(LFLAGS) $(LIBS)
# this is a suffix replacement rule for building .o's from .c's
# it uses automatic variables $<: the name of the prerequisite of
# the rule(a .c file) and $@: the name of the target of the rule (a .o file)
# (see the gnu make manual section about automatic variables)
.c.o:
$(CXX) $(CXXFALGS) $(INCLUDES) -c $< -o $@
clean:
$(RM) *.o *~ $(MAIN)
depend: $(SRCS)
makedepend $(INCLUDES) $^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.