Skip to content

Commit d6316ea

Browse files
allowing LDFLAGS and CPPFLAGS to be passed to makefile
1 parent b6e0815 commit d6316ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ CXX = g++
3333
CXXFLAGS = -Wall -std=c++11
3434
OPTFLAGS = -O3
3535
DEBUGFLAGS = -g
36+
override CPPFLAGS += $(INCLUDEARGS)
3637

3738
ifdef DEBUG
3839
CXXFLAGS += $(DEBUGFLAGS)
@@ -43,7 +44,7 @@ endif
4344
all: $(OBJECTS) static
4445

4546
%.o: %.cpp %.hpp
46-
$(CXX) $(CXXFLAGS) -c -o $@ $< $(INCLUDEARGS)
47+
$(CXX) $(CXXFLAGS) -c -o $@ $< $(CPPFLAGS) $(LDLIBS) $(LDFLAGS)
4748

4849
static: $(OBJECTS)
4950
ar cr $(STATIC_LIB) $^

0 commit comments

Comments
 (0)