From: Michał Bartoszkiewicz Date: Fri, 17 Dec 2010 00:02:12 +0000 (+0100) Subject: Przejście na autoconf i automake. X-Git-Tag: v1.0 X-Git-Url: https://git.bzium.org/embe/choinka.git/commitdiff_plain/30ae2236522617b0177e232cd7232514edabfdf8 Przejście na autoconf i automake. --- 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