From 82dd64ff241b2dc376f44cea4e174a5face7c19d Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 13 Feb 2009 19:09:25 +0100 Subject: [PATCH] Move stuff to include/ and src/ --- Makefile | 14 ++++++++------ commands.h => include/commands.h | 0 data.h => include/data.h | 0 debug.h => include/debug.h | 0 font.h => include/font.h | 0 handlers.h => include/handlers.h | 0 i3.h => include/i3.h | 0 layout.h => include/layout.h | 0 queue.h => include/queue.h | 14 +++++++------- table.h => include/table.h | 0 util.h => include/util.h | 0 xcb.h => include/xcb.h | 0 commands.c => src/commands.c | 0 debug.c => src/debug.c | 0 font.c => src/font.c | 0 handlers.c => src/handlers.c | 0 layout.c => src/layout.c | 0 mainx.c => src/mainx.c | 0 table.c => src/table.c | 0 util.c => src/util.c | 0 xcb.c => src/xcb.c | 0 21 files changed, 15 insertions(+), 13 deletions(-) rename commands.h => include/commands.h (100%) rename data.h => include/data.h (100%) rename debug.h => include/debug.h (100%) rename font.h => include/font.h (100%) rename handlers.h => include/handlers.h (100%) rename i3.h => include/i3.h (100%) rename layout.h => include/layout.h (100%) rename queue.h => include/queue.h (99%) rename table.h => include/table.h (100%) rename util.h => include/util.h (100%) rename xcb.h => include/xcb.h (100%) rename commands.c => src/commands.c (100%) rename debug.c => src/debug.c (100%) rename font.c => src/font.c (100%) rename handlers.c => src/handlers.c (100%) rename layout.c => src/layout.c (100%) rename mainx.c => src/mainx.c (100%) rename table.c => src/table.c (100%) rename util.c => src/util.c (100%) rename xcb.c => src/xcb.c (100%) diff --git a/Makefile b/Makefile index 9e919dc8..3fd244fb 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,8 @@ CFLAGS += -Wall # Extended debugging flags, macros shall be available in gcc CFLAGS += -gdwarf-2 CFLAGS += -g3 -#CFLAGS += -I/usr/include/xcb +CFLAGS += -Iinclude CFLAGS += -I/usr/local/include/ -#CFLAGS += -I/usr/local/include/xcb CFLAGS += -I/usr/pkg/include LDFLAGS += -lxcb-wm @@ -18,13 +17,16 @@ ifeq ($(UNAME),NetBSD) LDFLAGS += -Wl,-rpath,/usr/local/lib -Wl,-rpath,/usr/pkg/lib endif -FILES=$(patsubst %.c,%.o,$(wildcard *.c)) +FILES=$(patsubst %.c,%.o,$(wildcard src/*.c)) -%.o: %.c %.h data.h +src/%.o: src/%.c include/%.h include/data.h $(CC) $(CFLAGS) -c -o $@ $< all: ${FILES} - $(CC) -o mainx ${FILES} $(LDFLAGS) + $(CC) -o i3 ${FILES} $(LDFLAGS) clean: - rm -f *.o + rm -f src/*.o + +distclean: clean + rm -f i3 diff --git a/commands.h b/include/commands.h similarity index 100% rename from commands.h rename to include/commands.h diff --git a/data.h b/include/data.h similarity index 100% rename from data.h rename to include/data.h diff --git a/debug.h b/include/debug.h similarity index 100% rename from debug.h rename to include/debug.h diff --git a/font.h b/include/font.h similarity index 100% rename from font.h rename to include/font.h diff --git a/handlers.h b/include/handlers.h similarity index 100% rename from handlers.h rename to include/handlers.h diff --git a/i3.h b/include/i3.h similarity index 100% rename from i3.h rename to include/i3.h diff --git a/layout.h b/include/layout.h similarity index 100% rename from layout.h rename to include/layout.h diff --git a/queue.h b/include/queue.h similarity index 99% rename from queue.h rename to include/queue.h index 56d9c4af..75bb957a 100644 --- a/queue.h +++ b/include/queue.h @@ -36,7 +36,7 @@ #define _SYS_QUEUE_H_ /* - * This file defines five types of data structures: singly-linked lists, + * This file defines five types of data structures: singly-linked lists, * lists, simple queues, tail queues, and circular queues. * * @@ -95,15 +95,15 @@ struct name { \ struct type *slh_first; /* first element */ \ } - + #define SLIST_HEAD_INITIALIZER(head) \ { NULL } - + #define SLIST_ENTRY(type) \ struct { \ struct type *sle_next; /* next element */ \ } - + /* * Singly-linked List access methods. */ @@ -318,8 +318,8 @@ struct { \ struct type **tqe_prev; /* address of previous next element */ \ } -/* - * tail queue access methods +/* + * tail queue access methods */ #define TAILQ_FIRST(head) ((head)->tqh_first) #define TAILQ_END(head) NULL @@ -426,7 +426,7 @@ struct { \ } /* - * Circular queue access methods + * Circular queue access methods */ #define CIRCLEQ_FIRST(head) ((head)->cqh_first) #define CIRCLEQ_LAST(head) ((head)->cqh_last) diff --git a/table.h b/include/table.h similarity index 100% rename from table.h rename to include/table.h diff --git a/util.h b/include/util.h similarity index 100% rename from util.h rename to include/util.h diff --git a/xcb.h b/include/xcb.h similarity index 100% rename from xcb.h rename to include/xcb.h diff --git a/commands.c b/src/commands.c similarity index 100% rename from commands.c rename to src/commands.c diff --git a/debug.c b/src/debug.c similarity index 100% rename from debug.c rename to src/debug.c diff --git a/font.c b/src/font.c similarity index 100% rename from font.c rename to src/font.c diff --git a/handlers.c b/src/handlers.c similarity index 100% rename from handlers.c rename to src/handlers.c diff --git a/layout.c b/src/layout.c similarity index 100% rename from layout.c rename to src/layout.c diff --git a/mainx.c b/src/mainx.c similarity index 100% rename from mainx.c rename to src/mainx.c diff --git a/table.c b/src/table.c similarity index 100% rename from table.c rename to src/table.c diff --git a/util.c b/src/util.c similarity index 100% rename from util.c rename to src/util.c diff --git a/xcb.c b/src/xcb.c similarity index 100% rename from xcb.c rename to src/xcb.c