From 30ae2236522617b0177e232cd7232514edabfdf8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Bartoszkiewicz?= Date: Fri, 17 Dec 2010 01:02:12 +0100 Subject: [PATCH] =?utf8?q?Przej=C5=9Bcie=20na=20autoconf=20i=20automake.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .gitignore | 11 +++++++++++ Makefile | 40 ---------------------------------------- Makefile.am | 2 ++ configure.ac | 14 ++++++++++++++ 4 files changed, 27 insertions(+), 40 deletions(-) delete mode 100644 Makefile create mode 100644 Makefile.am create mode 100644 configure.ac diff --git a/.gitignore b/.gitignore index 543b1ae..b0c2afc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,13 @@ *.o choinka + +# autotools +.deps +aclocal.m4 +autom4te.cache +build-aux +config.log +config.status +configure +Makefile +Makefile.in diff --git a/Makefile b/Makefile deleted file mode 100644 index c9f6b9b..0000000 --- a/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -CC := gcc -CPPFLAGS := -CFLAGS := -O2 -Wextra -Wall -LDFLAGS := -LDLIBS := -RM := rm - -override CFLAGS += -std=gnu99 -override LDLIBS += -lncurses - -INSTALL := install - -DESTDIR := -PREFIX := /usr -BINDIR = $(PREFIX)/bin - -EXE := choinka - -CSOURCES := $(wildcard *.c) -COBJECTS := $(CSOURCES:.c=.o) -SOURCES := $(sort $(CSOURCES)) -OBJECTS := $(sort $(COBJECTS)) - -.PHONY: all -all: $(EXE) - -%.o: %.c - $(CC) -c $(CPPFLAGS) $(CFLAGS) $^ -o $@ - -$(EXE): $(OBJECTS) - $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ - -.PHONY: clean -clean: - $(RM) -f $(EXE) *.o *~ *.bak *.orig *.rej - -.PHONY: install -install: $(EXE) - $(INSTALL) -d $(DESTDIR)$(BINDIR) - $(INSTALL) -c $(EXE) $(DESTDIR)$(BINDIR) diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..4cb0421 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,2 @@ +bin_PROGRAMS := choinka +choinka_SOURCES := choinka.c diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..bcfe79a --- /dev/null +++ b/configure.ac @@ -0,0 +1,14 @@ +AC_PREREQ([2.65]) +AC_INIT([choinka], [1.0]) +AC_CONFIG_SRCDIR([choinka.c]) +AC_CONFIG_AUX_DIR([build-aux]) + +AM_INIT_AUTOMAKE([1.11 foreign]) +AM_SILENT_RULES([yes]) + +AC_PROG_CC_C99 + +AC_SEARCH_LIBS([setupterm], [ncurses]) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT -- 2.45.2