Files
libgit2/Makefile
Shawn O. Pearce 16a67770b7 Create a micro abstraction around the POSIX file APIs
This way we can start to write IO code to read and write files in the
Git object database, but provide a hook to inject native Win32 APIs
instead so libgit2 can be ported to run natively on that platform.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-01 16:53:06 -07:00

46 lines
738 B
Makefile

all::
DOXYGEN = doxygen
CFLAGS = -g -O2
OS = unix
BASIC_CFLAGS := -Iinclude
BASIC_CFLAGS += -DGIT__PRIVATE
BASIC_CFLAGS += -fvisibility=hidden
OBJS = $(patsubst %.c,%.o,$(wildcard src/*.c))
HDRS = $(wildcard include/git/*.h)
OBJS += src/os/$(OS).o
HDRS += include/git/config.h
HDRS += include/git/os/$(OS).h
all:: libgit2.a
clean:
rm -f libgit2.a src/*.o
rm -f include/git/config.h
rm -rf apidocs
apidocs:
$(DOXYGEN) api.doxygen
cp CONVENTIONS apidocs/
.c.o:
$(CC) $(BASIC_CFLAGS) $(CFLAGS) -c $< -o $@
include/git/config.h: include/git/config.h.in
sed 's/@@OS@@/$(OS)/g' $< >$@+
mv $@+ $@
$(OBJS): $(HDRS)
libgit2.a: $(OBJS)
rm -f libgit2.a
$(AR) cr libgit2.a $(OBJS)
.PHONY: all
.PHONY: clean
.PHONY: apidocs