gcc/libcody/Makesub.in

49 lines
950 B
Plaintext
Raw Normal View History

# CODYlib -*- mode:Makefile -*-
# Copyright (C) 2019-2020 Nathan Sidwell, nathan@acm.org
# License: Apache v2.0
DOXYGEN := @DOXYGEN@
CXXFLAGS/ := -I$(srcdir)
LIBCODY.O := buffer.o client.o fatal.o netclient.o netserver.o \
resolver.o packet.o server.o
all:: .gdbinit
.gdbinit: gdbinit
rm -f $@ ; ln -s $< $@
clean::
rm -f gdbinit .gdbinit
all:: libcody.a
libcody.a: $(LIBCODY.O)
$(AR) -cr $@ $^
clean::
rm -f $(LIBCODY.O) $(LIBCODY.O:.o=.d)
rm -f libcody.a
CXXFLAGS/fatal.cc = -DREVISION='"$(shell cat revision)"' -DSRCDIR='"$(srcdir)"'
fatal.o: Makefile revision
doc:: dox.cfg
ifneq ($(DOXYGEN),:)
cd $(<D); $(DOXYGEN) $(<F) >&dox.log
else
@echo "doxygen not present, documentation not built"
endif
clean::
rm -rf dox dox.log
install::
$(INSTALL) -d $(libdir) $(includedir)
$(INSTALL) libcody.a $(libdir)
$(INSTALL) $(srcdir)/cody.hh $(includedir)
ifeq ($(filter clean%,$(MAKECMDGOALS)),)
-include $(LIBCODY.O:.o=.d)
endif