mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
Now that we have more than one bees release it's somewhat important to know which one each bug report is for...
42 lines
906 B
Makefile
42 lines
906 B
Makefile
PROGRAMS = \
|
|
../bin/bees \
|
|
../bin/fiemap \
|
|
../bin/fiewalk \
|
|
|
|
all: $(PROGRAMS) depends.mk
|
|
|
|
include ../makeflags
|
|
|
|
LIBS = -lcrucible -lpthread
|
|
LDFLAGS = -L../lib -Wl,-rpath=$(shell realpath ../lib)
|
|
|
|
depends.mk: Makefile *.cc
|
|
echo "#define BEES_VERSION \"$(shell git describe --always --dirty || echo UNKNOWN)\"" > bees-version.new.h
|
|
mv -f bees-version.new.h bees-version.h
|
|
for x in *.cc; do $(CXX) $(CXXFLAGS) -M "$$x"; done > depends.mk.new
|
|
mv -fv depends.mk.new depends.mk
|
|
|
|
-include depends.mk
|
|
|
|
%.o: %.cc %.h
|
|
$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
|
|
|
../bin/%: %.o
|
|
@echo Implicit bin rule "$<" '->' "$@"
|
|
$(CXX) $(CXXFLAGS) -o "$@" "$<" $(LDFLAGS) $(LIBS)
|
|
|
|
BEES_OBJS = \
|
|
bees.o \
|
|
bees-context.o \
|
|
bees-hash.o \
|
|
bees-resolve.o \
|
|
bees-roots.o \
|
|
bees-thread.o \
|
|
bees-types.o \
|
|
|
|
../bin/bees: $(BEES_OBJS)
|
|
$(CXX) $(CXXFLAGS) -o "$@" $(BEES_OBJS) $(LDFLAGS) $(LIBS)
|
|
|
|
clean:
|
|
-rm -fv *.o bees-version.h
|