Skip to content

Commit

Permalink
Add make install target.
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashanth Mundkur committed Oct 8, 2011
1 parent 216bfbe commit fd0e3e6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
5 changes: 5 additions & 0 deletions META
@@ -0,0 +1,5 @@
description = "OCaml library to read GeoIP database files from MaxMind"
version = "0.1.0"
requires = "unix bigarray"
archive(byte) = "geoip.cma"
archive(native) = "geoip.cmxa"
17 changes: 16 additions & 1 deletion Makefile
@@ -1,11 +1,18 @@
LIB = geoip

PYTHON = python
OCAMLBUILD = ocamlbuild

.PHONY: all test clean

# Hack to work around ocamlbuild 3.12.1 sanitation check bug.
# Hack to work around ocamlbuild 3.12.1 bug.
CLEANUP_FILES = geoip.cma geoip.cmxa geoip_test.byte geoip_test.native benchmark.byte benchmark.native

OBJ_DIR = _build/lib
LIB_INSTALLS = \
$(OBJ_DIR)/geoip.mli $(OBJ_DIR)/geoip.cmi \
$(OBJ_DIR)/geoip.cma $(OBJ_DIR)/geoip.cmxa $(OBJ_DIR)/geoip.a

all: lib/geoip_regions.ml lib/geoip_timezones.ml Makefile
-rm -f $(CLEANUP_FILES)
$(OCAMLBUILD) lib/all.otarget
Expand All @@ -25,3 +32,11 @@ clean:

realclean: clean
rm -f lib/geoip_regions.ml lib/geoip_timezones.ml

install:
ocamlfind install $(LIB) META $(LIB_INSTALLS)

uninstall:
ocamlfind remove $(LIB)

reinstall: uninstall install

0 comments on commit fd0e3e6

Please sign in to comment.