From c6298e79c316b155aec51ea6556f3f9aafc15729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Stensg=C3=A5rd?= Date: Tue, 15 Nov 2011 22:03:45 +0100 Subject: autotoolify --- .gitignore | 13 +++++++++++++ Makefile | 27 --------------------------- Makefile.am | 7 +++++++ configure.ac | 9 +++++++++ 4 files changed, 29 insertions(+), 27 deletions(-) delete mode 100644 Makefile create mode 100644 Makefile.am create mode 100644 configure.ac diff --git a/.gitignore b/.gitignore index e027563..a565121 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,14 @@ ray +*.cache +*.log +*.o +*.status +*tar.gz +/.deps +/Makefile +/Makefile.in +/aclocal.m4 +/configure +/depcomp +/install-sh +/missing diff --git a/Makefile b/Makefile deleted file mode 100644 index 95d7e82..0000000 --- a/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -DEBUG = -O0 -ggdb -g3 -DEBUG = -O3 -CFLAGS = -Wall -pedantic -std=gnu99 $(DEBUG) -LDFLAGS = -lGL -lGLU -lglut -BINARY = ray -VERSION = 0.1 -PREFIX = /usr/local -OBJECTS = $(BINARY).o - -all: $(BINARY) - -$(BINARY): $(BINARY).c 3dmath.c - $(CC) $(CFLAGS) $(LDFLAGS) -o $(BINARY) 3dmath.c $(BINARY).c - -clean: - rm -f $(BINARY).o $(BINARY) - -install: all - mkdir -p $(PREFIX)/bin - cp -f $(BINARY) $(PREFIX)/bin/$(BINARY) - chmod 755 $(PREFIX)/bin/$(BINARY) - mkdir -p $(PREFIX)/man/man1 - sed "s/VERSION/$(VERSION)/g" < $(BINARY).1 > $(PREFIX)/man/man1/$(BINARY).1 - chmod 644 $(PREFIX)/man/man1/$(BINARY).1 - -uninstall: - rm -f $(BINARY) $(PREFIX)/bin/$(BINARY) diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..d4ace4b --- /dev/null +++ b/Makefile.am @@ -0,0 +1,7 @@ +AM_CFLAGS = -Wall -Wextra -pedantic -std=c99 + +bin_PROGRAMS = ray + +ray_LDFLAGS = -lGL -lGLU -lglut -lm + +ray_SOURCES = ray.c 3dmath.c 3dmath.h diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..3291ea7 --- /dev/null +++ b/configure.ac @@ -0,0 +1,9 @@ +AC_INIT(ray, 0.1.0) +AM_INIT_AUTOMAKE([-Wall -Werror foreign]) + +AC_PROG_CC +AC_PROG_CXX +AC_PROG_INSTALL +AC_PROG_MAKE_SET + +AC_OUTPUT(Makefile) -- cgit v1.2.3