58887f2c0becb9b9210dba3f4cf783cf17c9f081
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 Make the main branch compil...

David Blume authored 5 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)