From 751790959e453beb34c4719d941dfae83053d571 Mon Sep 17 00:00:00 2001 From: "J. Brandt Buckley" Date: Wed, 16 Apr 2014 00:59:37 -0700 Subject: [PATCH] Fix large file support. fixes #1 Tested in Ubuntu 13.10 on x86_64, Arch on i686, and Mac OS X 10.9 on x86_64. NOTE: Though this should work in most cases, it doesn't appear to be the POSIX/SUS-compliant way. We should probably just use autotools or cmake. --- Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 086d58b..3b88792 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,21 @@ # Makefile for symlinks -CC=gcc -OWNER=root -GROUP=root -MANDIR=/usr/man/man8/symlinks.8 -BINDIR=/usr/local/bin - +CC := gcc +CFLAGS += $(shell getconf LFS_CFLAGS 2>/dev/null) +OWNER = root +GROUP = root +MANDIR = /usr/man/man8/symlinks.8 +BINDIR = /usr/local/bin + +.PHONY: all all: symlinks symlinks: symlinks.c $(CC) -Wall -Wstrict-prototypes -O2 $(CFLAGS) -o symlinks symlinks.c - + install: all symlinks.8 $(INSTALL) -c -o $(OWNER) -g $(GROUP) -m 755 symlinks $(BINDIR) $(INSTALL) -c -o $(OWNER) -g $(GROUP) -m 644 symlinks.8 $(MANDIR) +.PHONY: clean clean: rm -f symlinks *.o core