9d5b420de502e57af139e7b1d37c069e58a9d815
David Blume Add a debug target for test...

David Blume authored 8 years ago

1) .PHONEY: debug
David Blume first commit

David Blume authored 8 years ago

2) CXX=g++
David Blume Experimenting with lamda an...

David Blume authored 8 years ago

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

David Blume authored 8 years ago

4) LDFLAGS=
5) OBJDIR=obj
6) LIBDIR=../lib
7) 
8) SOURCES=my_lib.cpp
9) # //OBJECTS=$(OBJDIR)$(SOURCES:.cpp=.o)
10) OBJECTS=$(foreach bname, $(basename $(SOURCES)), $(OBJDIR)/$(bname).o)
11) LIB=$(LIBDIR)/libmy_lib.a
12) 
13) all: $(LIB)
14) 
David Blume Added a routine to cause a...

David Blume authored 8 years ago

15) debug: CPPFLAGS += -DDEBUG -ggdb
David Blume Add a debug target for test...

David Blume authored 8 years ago

16) debug: $(LIB)
17) 
David Blume first commit

David Blume authored 8 years ago

18) $(OBJDIR):
19) 	mkdir $@
20) 
21) $(LIBDIR):
22) 	mkdir $@
23) 
David Blume Added scoped_set_adder.

David Blume authored 8 years ago

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

David Blume authored 8 years ago

25) 	ar -rcs $@ $<
26) 
David Blume Added scoped_set_adder.

David Blume authored 8 years ago

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