Skip to content

Instantly share code, notes, and snippets.

@dbuscombe-usgs
Created July 26, 2013 01:53
Show Gist options
  • Save dbuscombe-usgs/6085427 to your computer and use it in GitHub Desktop.
Save dbuscombe-usgs/6085427 to your computer and use it in GitHub Desktop.
Makefile for Ken Clarkson's hull
CC = gcc
AR = ar
OBJS = hull.o ch.o io.o rand.o pointops.o fg.o
HDRS = hull.h points.h pointsites.h stormacs.h
SRC = hull.c ch.c io.c rand.c pointops.c fg.c
PROG = hull
BINDIR = /usr/bin
LIBDIR = /usr/lib64 # or just /usr/lib on a 32 bit machine?
LIB = $(LIBDIR)/lib$(PROG).a
all : $(PROG) rsites
cp $(PROG) $(BINDIR)/.
cp rsites $(BINDIR)/.
$(OBJS) : $(HDRS)
hullmain.o : $(HDRS)
$(PROG) : $(OBJS) hullmain.o
$(CC) $(OBJS) hullmain.o -o $(PROG) -lm
$(AR) rcv $(LIB) $(OBJS)
rsites : rsites.c
$(CC) -o rsites rsites.c -lm
clean :
-rm -f $(OBJS) hullmain.o core a.out $(PROG)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment