6e0f69c17c32b0b7c591d9b82ba8af5437cc5c90
David Blume first commit

David Blume authored 8 years ago

1) CXX=g++
David Blume Added scoped_set_adder.

David Blume authored 8 years ago

2) CPPFLAGS=-c -Wall -std=c++11 -I../include
David Blume first commit

David Blume authored 8 years ago

3) LDFLAGS=
4) OBJDIR=obj
5) LIBDIR=../lib
6) 
7) SOURCES=my_lib.cpp
8) # //OBJECTS=$(OBJDIR)$(SOURCES:.cpp=.o)
9) OBJECTS=$(foreach bname, $(basename $(SOURCES)), $(OBJDIR)/$(bname).o)
10) LIB=$(LIBDIR)/libmy_lib.a
11) 
12) all: $(LIB)
13) 
14) $(OBJDIR):
15) 	mkdir $@
16) 
17) $(LIBDIR):
18) 	mkdir $@
19) 
David Blume Added scoped_set_adder.

David Blume authored 8 years ago

20) $(LIB): $(OBJECTS) | $(LIBDIR)
David Blume first commit

David Blume authored 8 years ago

21) 	ar -rcs $@ $<
22) 
David Blume Added scoped_set_adder.

David Blume authored 8 years ago

23) $(OBJDIR)/%.o: %.cpp | $(OBJDIR)