Added all remaining gists.
This commit is contained in:
24
Makefile/Makefile
Normal file
24
Makefile/Makefile
Normal file
@@ -0,0 +1,24 @@
|
||||
CXX = g++
|
||||
TARGET =
|
||||
OBJECTS =
|
||||
DEPENDS = $(OBJECTS:.o=.d)
|
||||
CXXFLAGS = -ansi -pedantic -Wall
|
||||
LDLIBS =
|
||||
|
||||
all: CXXFLAGS += -O2 -D_NDEBUG
|
||||
all: $(TARGET)
|
||||
|
||||
debug: CXXFLAGS += -g
|
||||
debug: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(CXX) -o $(TARGET) $(OBJECTS) $(CXXFLAGS) $(LDLIBS)
|
||||
|
||||
-include $(DEPENDS)
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $*.cpp -o $*.o
|
||||
$(CXX) -MM $(CXXFLAGS) $*.cpp > $*.d
|
||||
|
||||
clean:
|
||||
$(RM) $(TARGET) $(OBJECTS) $(DEPENDS)
|
1
Makefile/README.md
Normal file
1
Makefile/README.md
Normal file
@@ -0,0 +1 @@
|
||||
A simple and common GNU Makefile template for C/C++
|
Reference in New Issue
Block a user