aboutsummaryrefslogtreecommitdiff
path: root/c++-libbu++/Makefile
blob: 5ff92924fe152307207e4955b0e1ee47c496c2e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
OBJECTS := $(patsubst %.cpp,%.o,$(wildcard src/*.cpp))

.PHONY: default all headers clean tests install

default: libgats.a

all: default tests

clean:
	-rm ${HEADERS} ${OBJECTS} libgats.a ${TOOLS} ${UNITS} ${TESTS}

$(foreach fn,$(wildcard src/*.h),bu/$(notdir ${fn})): bu/%: src/%
	ln -s ../$< $@

${OBJECTS}: %.o: %.cpp
	${CXX} -ggdb -W -Wall -I. -I../../libbu++ ${CXXFLAGS} $< -c -o $@

libgats.a: ${HEADERS} ${OBJECTS}
	ar -r libgats.a ${OBJECTS}