add to build process
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@636 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
2a9b1a7bcd
commit
e1493017a7
1 changed files with 50 additions and 9 deletions
|
@ -1,10 +1,51 @@
|
||||||
BIN = main
|
|
||||||
CXXFLAGS = -Wall -Wold-style-cast -Wundef -Wsign-compare -Wconversion -Wpointer-arith -pedantic -O2
|
|
||||||
CPPFLAGS = -I../../include -DNDEBUG
|
|
||||||
LDFLAGS = -L../../lib
|
|
||||||
LDLIBS = -lloki
|
|
||||||
|
|
||||||
.PHONY: build clean
|
CXX = g++
|
||||||
build: $(BIN)
|
CXXFLAGS = -Wall -Wold-style-cast -Wundef -Wsign-compare -Wconversion -Wpointer-arith -pedantic -O2 -I../../include -DNDEBUG
|
||||||
clean:
|
LINK = g++
|
||||||
rm -f $(BIN) $(BIN).exe $(BIN).o
|
LFLAGS = -L../../lib
|
||||||
|
LIBS = -lloki
|
||||||
|
DEL_FILE = rm -f
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue