mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
40 lines
717 B
Makefile
40 lines
717 B
Makefile
PROGRAMS = \
|
|
chatter \
|
|
crc64 \
|
|
fd \
|
|
limits \
|
|
path \
|
|
process \
|
|
task \
|
|
|
|
all: test
|
|
|
|
test: $(PROGRAMS) Makefile
|
|
set -x; for prog in $(PROGRAMS); do ./$$prog || exit 1; done
|
|
|
|
include ../makeflags
|
|
|
|
LIBS = -lcrucible -lpthread
|
|
LDFLAGS = -L../lib -Wl,-rpath=$(shell realpath ../lib)
|
|
|
|
.depends/%.dep: %.cc tests.h Makefile
|
|
@mkdir -p .depends
|
|
$(CXX) $(CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $<
|
|
|
|
depends.mk: $(PROGRAMS:%=.depends/%.dep)
|
|
cat $^ > $@.new
|
|
mv -f $@.new $@
|
|
|
|
include depends.mk
|
|
|
|
%.o: %.cc %.h ../makeflags Makefile
|
|
@echo "Implicit rule %.o: %.cc"
|
|
$(CXX) $(CXXFLAGS) -o $@ -c $<
|
|
|
|
%: %.o ../makeflags Makefile
|
|
@echo "Implicit rule %: %.o"
|
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
|
|
|
|
clean:
|
|
rm -fv *.o
|