summaryrefslogtreecommitdiff
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* add library includes, remove Makefile and readme update for wafScott Chacon2010-11-241-215/+0
|
* Force PIC on the MakefileVicent Marti2010-11-041-1/+1
| | | | | | | Added -fPIC (position-independent code) to the EXTRA_CFLAGS var in the Makefile. Required in x64 when building the shared library. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* msvc: Disable a level 4 warning and change -W3 to -W4Ramsay Jones2010-06-071-1/+1
| | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Makefile(s): Add -Wextra to CFLAGSRamsay Jones2010-06-071-1/+1
| | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Makefile: Add a target to generate C preprocessor output filesRamsay Jones2010-06-071-1/+5
| | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Add support to enable the library to use OpenSSL SHA1 functionsRamsay Jones2010-05-041-0/+10
| | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Makefile(s): Don't include the OpenSSL crypto library in the linkRamsay Jones2010-04-281-2/+2
| | | | | | Also, fully purge the NO_OPENSSL build variable. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Makefile: 'make clean' wipe all editor backup files in src/*/Ramsay Jones2010-04-281-1/+1
| | | | | | | | In a similar way to commit 9b17380 ("Make 'make clean' wipe all object files in src/*/", 2010-04-14), we use a shell glob when removing editor backup files. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Makefile: Add source for the built-in SHA1 routines to $(SRC_C)Ramsay Jones2010-04-281-4/+3
| | | | | | | | | This results in the 'sparse' and 'coverage' targets including the C source files for the built-in SHA1 routines. In addition to the sparse check, this results in the generation of the '.gcov' file and inclusion in the test coverage report. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Merge remote branch 'ramsay/dev'Andreas Ericsson2010-04-231-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | * ramsay/dev: Add a pack index 'virtual function' to fetch an index entry Add a pack index 'virtual function' to search by file offset Change the interface of the pack index search function Add an 64-bit offset table index bounds check for v2 pack index Add a minimum size check when opening an v2 pack index file win32: Add separate MinGW and MSVC compatability header files Makefile: Add support for custom build options in config.mak file Fix some coding style issues
| * Makefile: Add support for custom build options in config.mak fileRamsay Jones2010-02-281-0/+2
| | | | | | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* | Add block-sha1 in favour of the mozilla routinesAndreas Ericsson2010-04-141-14/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since block-sha1 from git.git has such excellent performance, we can also get rid of the openssl dependency. It's rather simple to add it back later as an optional extra, but we really needn't bother to pull in the entire ssl library and have to deal with linking issues now that we have the portable and, performance-wise, truly excellent block-sha1 code to fall back on. Since this requires a slight revamp of the build rules anyway, we take the opportunity to fix including EXTRA_OBJS in the final build as well. The block-sha1 code was originally implemented for git.git by Linus Torvalds <torvalds@linux-foundation.org> and was later polished by Nicolas Pitre <nico@cam.org>. Signed-off-by: Andreas Ericsson <ae@op5.se>
* | Add generic buildrule for assembly filesAndreas Ericsson2010-04-141-0/+3
| | | | | | | | Signed-off-by: Andreas Ericsson <ae@op5.se>
* | Make 'make clean' wipe all object files in src/*/Andreas Ericsson2010-04-141-1/+1
|/ | | | | | | | Instead of naming the subdirectories explicitly (which will result in us forgetting about one sooner or later), we change the shell glob pattern to wipe all object files from all subdirectories under src/. Signed-off-by: Andreas Ericsson <ae@op5.se>
* Makefile: Add support for building with MSVCRamsay Jones2010-02-011-2/+22
| | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Makefile: Add some missing $(GIT_LIB) dependenciesRamsay Jones2010-01-201-1/+1
| | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Add support for the MinGW platformRamsay Jones2010-01-201-1/+7
| | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Add test-suite coverage testing using gcovRamsay Jones2009-10-131-0/+39
| | | | | | | | | | | | | | | Add a new "coverage" Makefile target that re-builds the library and tests using the gcc compiler/linker flags required by gcov, runs the test suite to capture the runtime data, then compiles a coverage report. The report, which is saved in a file named "untested", consists of a list of untested files, followed by a list of untested functions. More detailed execution statistics are given in the gcov log files which are saved in the top-level directory (named like src#hash.c.gcov). Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Add support for running the tests via valgrindRamsay Jones2009-10-131-2/+6
| | | | | | | | | | | | | | | | | Add some makefile targets, which use valgrind's memcheck tool to run the tests, in order to help diagnose memory problems in the library. In addition, we enable the '--leak-check' option to report on any memory leaks. However, unlike the other memory problems reported by memcheck, memory leak reports do not result in an error exit from valgrind. (So memory leaks are reported on stderr, but don't halt the test run.) A suppressions file (tests.supp) is included since libz triggers some false positives. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Makefile: move test related targets to a new tests/MakefileRamsay Jones2009-06-051-45/+11
| | | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
* Makefile: Add CFLAGS to the "test_main.c" compile targetRamsay Jones2009-06-051-1/+1
| | | | | | | | Also, add the <string.h> include to test_main.c, in order to suppress the resulting "implicit declaration of strcmp()" warning. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
* win32: Add routines to abstract memory-mapped file functionsRamsay Jones2009-03-201-4/+8
| | | | | | | | | | In particular, the git__mmap() and git__munmap() routines provide the interface to platform specific memory-mapped file facilities. We provide implementations for unix and win32, which can be found in their own sub-directories. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Factor out test helper methods for creating/deleting loose objectsJulio Espinoza-Sokal2009-03-171-2/+2
| | | | | Signed-off-by: Julio Espinoza-Sokal <julioes@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add built-in (Mozilla) SHA1 routinesRamsay Jones2009-03-171-8/+32
| | | | | | | | | | | | | | | | | | | Paul agreed to the GCC-exception license by email: | | From: Paul Kocher <paul@cryptography.com> | Date: Sun, 15 Mar 2009 11:37:23 -0700 | Subject: Re: Adding Mozilla SHA1 implementation to libgit2 | | Yes - that's fine. | | At 01:56 AM 3/5/2009, Andreas Ericsson wrote: | > Hi Paul. We spoke earlier about this, if you remember? | > We'd like to add the GCC-exception to the GPL license | > for these files. Signed-off-by: Paul Kocher <paul@cryptography.com> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Use install instead of 'cp -f' and 'mkdir -p'.Ingmar Vanhassel2009-02-011-6/+7
| | | | | Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add libgit2.pc to make clean rule.Ingmar Vanhassel2009-02-011-0/+1
| | | | | Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add support for installing to a libdir other than 'lib'.Ingmar Vanhassel2009-02-011-7/+8
| | | | | Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add DESTDIR support.Ingmar Vanhassel2009-02-011-10/+10
| | | | | Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add a build variable to allow supression of -fvisibilityRamsay Jones2008-12-311-0/+13
| | | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Run ranlib on libgit2.a after archiving itShawn O. Pearce2008-12-311-0/+2
| | | | | | | | Some linkers require ranlib to build a symbol table on the archive in order to work with it. Most platforms that don't have this requirement permit ranlib as a noop. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add some routines for SHA1 hash computationRamsay Jones2008-12-301-1/+1
| | | | | | | | | [sp: Changed signature for output to use git_oid, and added a test case to verify an allocated git_hash_ctx can be reinitialized and reused.] Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add pkg-config support.Steve Frécinaux2008-12-301-1/+7
| | | | | | | | The libgit2.pc is generated on make install and installed, to allow using the lib through the pkg-config helper. Signed-off-by: Steve Frécinaux <code@istique.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add make install and uninstall targets.Steve Frécinaux2008-12-301-0/+18
| | | | | | | It accepts a prefix= parameter (default: /usr/local). Signed-off-by: Steve Frécinaux <code@istique.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Implement git_odb__read_loose()Ramsay Jones2008-12-191-1/+1
| | | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Remove references to src/git/config.hShawn O. Pearce2008-12-181-1/+0
| | | | | | It was removed in ec250c6e18e56d12714f9010e1b15e5feec5f473. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Run tests in their own subdirectoryShawn O. Pearce2008-12-181-1/+7
| | | | | | | | | This way tests can run in parallel without stepping on each other's temporary work files. If a test passes the directory is removed completely; if a test fails only empty directories are removed. This permits inspection of the failed test's left behind state. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Use __CHECKER__ to detect when sparse is runningRamsay Jones2008-12-021-1/+1
| | | | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Acked-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Use cgcc in the sparse targetRamsay Jones2008-12-021-1/+1
| | | | | | | | | | | | | | | cgcc is the recommended way to run sparse, since it provides many -Defines suitable to the given gcc platform. For example, on some Ubuntu/glibc versions, a plain sparse invocation gives the following warning: "warning: This machine appears to be neither x86_64 nor i386." Using "cgcc -no-compile" instead eliminates this warning. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Acked-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Remove config.h and make fileops an internal APIAndreas Ericsson2008-12-021-10/+1
| | | | | | | | | | | | | | Since it doesn't make sense to make the disk access stuff portable *AND* public (that's a job for each application imo), we can take a shortcut and just support unixy stuff for now and get away with coding most of it as macros. Since we go with an internal API for starters and only provide higher-level API's to the libgit users, we'll be ok with this approach. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Make using CFLAGS a bit simplerAndreas Ericsson2008-11-221-3/+4
| | | | | | | | | | | | | This patch introduces the $(ALL_CFLAGS) variable, which holds $(BASIC_CFLAGS) as well as userdefined $(CFLAGS) and then consistently uses that variable where both were used anyway. Since we're in the area, we optimize the sparse running a bit, getting rid of the shell and just letting sparse iterate over the files. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add $(CONFIG_H) as a build-dependency for sparseAndreas Ericsson2008-11-221-1/+1
| | | | | Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Make src/git/config.h a macro in MakefileAndreas Ericsson2008-11-221-1/+2
| | | | | | | | This makes it far more convenient to reference as a dependency for other targets. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add an embryo of a TLS-aware error handling systemAndreas Ericsson2008-11-221-1/+1
| | | | | | | | | | | | | | | | This adds the per-thread global variable git_errno to the system, which callers can examine to get information about an error. Two helper functions are added to reduce LoC-count for the library code itself. Also, some exceptions are made for running sparse on GIT_TLS definitions, since it doesn't grok thread-local variables at all. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add a 'sparse' make targetAndreas Ericsson2008-11-221-1/+6
| | | | | | | | | | Given the confusion on git@vger, we'd better not name this target "check" or (worse) "test", but it's still useful to have. As "sparse", noone should have problems understanding what it does. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* s/COPYING/.HEADER/ for install-headers targetAndreas Ericsson2008-11-221-1/+1
| | | | | | | | We don't want to prepend the entire license; Only the file header part of it. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Get rid of GIT__PRIVATE macroAndreas Ericsson2008-11-221-1/+0
| | | | | | | | | | | | | Using it in the first place means something's wrong. This patch replaces it with an internal header which carries the previously "protected" code instead. Internal source-files simply include "commit.h" and they're done. The internal header includes the public one to make sure we always use the proper prototype. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add a fake and phony install-headers targetAndreas Ericsson2008-11-181-0/+5
| | | | | | | | It actually does what it's supposed to (more or less), but not very portably and not to the correct directory. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Move public headers to src/gitAndreas Ericsson2008-11-181-8/+10
| | | | | | | | | | | It's arguably smoother to keep them close to the source, as that's where one's working when modifying them. More importantly, though, is the ability to use private headers in the src/ dir that simply include "git/$samename.h" to get to the public API at the same time. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Fix Makefile to correctly handle 'make -j4 test'Shawn O. Pearce2008-11-031-14/+28
| | | | | | | | If we have more than one test build running we cannot use the same file for each test case; instead we need to use a per-test path so there aren't any collisions. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Enable warnings by default and fix warning in oid.cShawn O. Pearce2008-11-031-1/+1
| | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org>