]> git.bzium.org/ - embe/choinka.git/commitdiff
Przejście na autoconf i automake. v1.0
authorMichał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
Fri, 17 Dec 2010 00:02:12 +0000 (01:02 +0100)
committerMichał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
Fri, 17 Dec 2010 00:02:12 +0000 (01:02 +0100)
.gitignore
Makefile [deleted file]
Makefile.am [new file with mode: 0644]
configure.ac [new file with mode: 0644]

index 543b1ae40a58deae91fed5b6aafd05543ac40b57..b0c2afcbd624bff6ae389587a8413076d0e0ff80 100644 (file)
@@ -1,2 +1,13 @@
 *.o
 choinka
 *.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 (file)
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 (file)
index 0000000..4cb0421
--- /dev/null
@@ -0,0 +1,2 @@
+bin_PROGRAMS := choinka
+choinka_SOURCES := choinka.c
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..bcfe79a
--- /dev/null
@@ -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