mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-11 01:44:02 +00:00

This reorganizes a few of the examples so that the main function comes first with the argument parsing extracted into a helper that can come at the end of the file (so the example focuses more on the use of libgit2 instead of command line support). This also creates a shared examples/common.[ch] so that useful helper funcs can be shared across examples instead of repeated.
16 lines
336 B
Makefile
16 lines
336 B
Makefile
.PHONY: all
|
|
|
|
CC = gcc
|
|
CFLAGS = -g -I../include -I../src -Wall -Wextra -Wmissing-prototypes -Wno-missing-field-initializers
|
|
LFLAGS = -L../build -lgit2 -lz
|
|
APPS = general showindex diff rev-list cat-file status log rev-parse init
|
|
|
|
all: $(APPS)
|
|
|
|
% : %.c
|
|
$(CC) -o $@ common.c $(CFLAGS) $< $(LFLAGS)
|
|
|
|
clean:
|
|
$(RM) $(APPS)
|
|
$(RM) -r *.dSYM
|