mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
50 lines
936 B
Makefile
50 lines
936 B
Makefile
PROGRAMS = \
|
|
../bin/bees \
|
|
../bin/fiemap \
|
|
../bin/fiewalk \
|
|
|
|
all: $(PROGRAMS)
|
|
|
|
include ../makeflags
|
|
|
|
LIBS = -lcrucible -lpthread
|
|
LDFLAGS = -L../lib
|
|
|
|
BEES_OBJS = \
|
|
bees.o \
|
|
bees-context.o \
|
|
bees-hash.o \
|
|
bees-resolve.o \
|
|
bees-roots.o \
|
|
bees-thread.o \
|
|
bees-types.o \
|
|
|
|
bees-version.c: bees.h $(BEES_OBJS:.o=.cc) Makefile
|
|
echo "const char *BEES_VERSION = \"$(BEES_VERSION)\";" > bees-version.new.c
|
|
mv -f bees-version.new.c bees-version.c
|
|
|
|
.depends:
|
|
mkdir -p $@
|
|
|
|
.depends/%.dep: %.cc Makefile | .depends
|
|
$(CXX) $(CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $<
|
|
|
|
depends.mk: $(BEES_OBJS:%.o=.depends/%.dep)
|
|
cat $^ > $@.new
|
|
mv -f $@.new $@
|
|
|
|
include depends.mk
|
|
|
|
%.o: %.cc %.h
|
|
$(CXX) $(CXXFLAGS) -o $@ -c $<
|
|
|
|
../bin/%: %.o
|
|
@echo Implicit bin rule "$<" '->' "$@"
|
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
|
|
|
|
../bin/bees: $(BEES_OBJS) bees-version.o
|
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
|
|
|
|
clean:
|
|
rm -fv *.o bees-version.c
|