- Various makefile improvements (better mingw support, easier to add new sources)
- Include loki/StrongPtr.hpp, not Loki/StrongPtr.hpp (test/SmartPtr) git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@638 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
cdc57d88aa
commit
85a490c387
23 changed files with 340 additions and 280 deletions
|
@ -1,51 +1,12 @@
|
|||
BIN = main$(BIN_SUFFIX)
|
||||
SRC = main.cpp strong.cpp
|
||||
OBJ = $(SRC:.cpp=.o)
|
||||
|
||||
CXX = g++
|
||||
CXXFLAGS = -Wall -Wold-style-cast -Wundef -Wsign-compare -Wconversion -Wpointer-arith -pedantic -O2 -I../../include -DNDEBUG
|
||||
LINK = g++
|
||||
LFLAGS = -L../../lib
|
||||
LIBS = -lloki
|
||||
DEL_FILE = rm -f
|
||||
.PHONY: all clean
|
||||
all: $(BIN)
|
||||
clean:
|
||||
$(RM) $(BIN)
|
||||
$(RM) $(OBJ)
|
||||
|
||||
SOURCES = \
|
||||
main.cpp \
|
||||
strong.cpp
|
||||
|
||||
OBJECTS = \
|
||||
main.o \
|
||||
strong.o
|
||||
|
||||
TARGET = main.exe
|
||||
|
||||
####### Implicit rules
|
||||
|
||||
.SUFFIXES: .cpp
|
||||
|
||||
.cpp.o:
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
|
||||
|
||||
####### Build rules
|
||||
|
||||
first: all
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(LINK) $(LFLAGS) -o "$(TARGET)" $(OBJECTS) $(LIBS)
|
||||
|
||||
|
||||
clean: compiler_clean
|
||||
-$(DEL_FILE) main.o strong.o
|
||||
-$(DEL_FILE) "$(TARGET)"
|
||||
|
||||
compiler_clean:
|
||||
|
||||
|
||||
|
||||
####### Compile
|
||||
|
||||
main.o: main.cpp
|
||||
$(CXX) -c $(CXXFLAGS) -o main.o main.cpp
|
||||
|
||||
strong.o: strong.cpp
|
||||
$(CXX) -c $(CXXFLAGS) -o strong.o strong.cpp
|
||||
|
||||
FORCE:
|
||||
$(BIN): $(OBJ)
|
||||
$(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue