Merge pull request #2507 from stapelberg/autotools
Switch to autotools (GNU build system)
This commit is contained in:
@ -1,10 +0,0 @@
|
||||
all:
|
||||
$(MAKE) -C .. i3bar/i3bar
|
||||
|
||||
install:
|
||||
$(MAKE) -C .. install-i3bar
|
||||
|
||||
clean:
|
||||
$(MAKE) -C .. clean-i3bar
|
||||
|
||||
.PHONY: all install clean
|
@ -1,28 +0,0 @@
|
||||
ALL_TARGETS += i3bar/i3bar
|
||||
INSTALL_TARGETS += install-i3bar
|
||||
CLEAN_TARGETS += clean-i3bar
|
||||
|
||||
i3bar_SOURCES := $(wildcard i3bar/src/*.c)
|
||||
i3bar_HEADERS := $(wildcard i3bar/include/*.h)
|
||||
i3bar_CFLAGS = $(XCB_CFLAGS) $(XCB_CURSOR_CFLAGS) $(PANGO_CFLAGS) $(XCB_XRM_CFLAGS) $(YAJL_CFLAGS) $(LIBEV_CFLAGS)
|
||||
i3bar_LIBS = $(XCB_LIBS) $(XCB_CURSOR_LIBS) $(PANGO_LIBS) $(XCB_XRM_LIBS) $(YAJL_LIBS) $(LIBEV_LIBS) $(XCB_XKB_LIBS)
|
||||
|
||||
i3bar_OBJECTS := $(i3bar_SOURCES:.c=.o)
|
||||
|
||||
|
||||
i3bar/src/%.o: i3bar/src/%.c $(i3bar_HEADERS)
|
||||
echo "[i3bar] CC $<"
|
||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3bar_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -Ii3bar/include -c -o $@ $<
|
||||
|
||||
i3bar/i3bar: libi3.a $(i3bar_OBJECTS)
|
||||
echo "[i3bar] Link i3bar"
|
||||
$(CC) $(I3_LDFLAGS) $(LDFLAGS) -o $@ $(filter-out libi3.a,$^) $(LIBS) $(i3bar_LIBS)
|
||||
|
||||
install-i3bar: i3bar/i3bar
|
||||
echo "[i3bar] Install"
|
||||
$(INSTALL) -d -m 0755 $(DESTDIR)$(EXEC_PREFIX)/bin
|
||||
$(INSTALL) -m 0755 i3bar/i3bar $(DESTDIR)$(EXEC_PREFIX)/bin/
|
||||
|
||||
clean-i3bar:
|
||||
echo "[i3bar] Clean"
|
||||
rm -f $(i3bar_OBJECTS) i3bar/i3bar
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#define STDIN_CHUNK_SIZE 1024
|
||||
|
@ -7,6 +7,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xproto.h>
|
||||
@ -85,6 +87,6 @@ TAILQ_HEAD(statusline_head, status_block) statusline_head;
|
||||
#include "mode.h"
|
||||
#include "trayclients.h"
|
||||
#include "xcb.h"
|
||||
#include "config.h"
|
||||
#include "configuration.h"
|
||||
#include "libi3.h"
|
||||
#include "parse_json_header.h"
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
typedef enum {
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/*
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <xcb/xproto.h>
|
||||
|
||||
#include "common.h"
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <cairo/cairo-xcb.h>
|
||||
|
||||
|
@ -10,6 +10,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
|
@ -7,6 +7,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "queue.h"
|
||||
|
||||
/* Get the maximum/minimum of x and y */
|
||||
|
@ -9,10 +9,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <xcb/xproto.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <xcb/xproto.h>
|
||||
|
||||
typedef struct i3_ws i3_ws;
|
||||
|
||||
TAILQ_HEAD(ws_head, i3_ws);
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
//#include "outputs.h"
|
||||
|
||||
|
@ -7,6 +7,8 @@
|
||||
* child.c: Getting input for the statusline
|
||||
*
|
||||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
@ -25,8 +27,6 @@
|
||||
#include <yajl/yajl_gen.h>
|
||||
#include <paths.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
/* Global variables for child_*() */
|
||||
i3bar_child child;
|
||||
|
||||
@ -105,7 +105,9 @@ __attribute__((format(printf, 1, 2))) static void set_statusline_error(const cha
|
||||
char *message;
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
(void)vasprintf(&message, format, args);
|
||||
if (vasprintf(&message, format, args) == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
struct status_block *err_block = scalloc(1, sizeof(struct status_block));
|
||||
err_block->full_text = i3string_from_utf8("Error: ");
|
||||
|
@ -7,6 +7,8 @@
|
||||
* config.c: Parses the configuration (received from i3).
|
||||
*
|
||||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -17,8 +19,6 @@
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
static char *cur_key;
|
||||
static bool parsing_bindings;
|
||||
static bool parsing_tray_outputs;
|
||||
|
@ -7,6 +7,8 @@
|
||||
* ipc.c: Communicating with i3
|
||||
*
|
||||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
@ -21,8 +23,6 @@
|
||||
#include <sanitizer/lsan_interface.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
|
||||
ev_io *i3_connection;
|
||||
|
||||
const char *sock_path;
|
||||
|
@ -5,6 +5,8 @@
|
||||
* © 2010 Axel Wagner and contributors (see also: LICENSE)
|
||||
*
|
||||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <i3/ipc.h>
|
||||
#include <string.h>
|
||||
@ -15,8 +17,6 @@
|
||||
#include <getopt.h>
|
||||
#include <glob.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
/*
|
||||
* Having verboselog(), errorlog() and debuglog() is necessary when using libi3.
|
||||
*
|
||||
|
@ -7,6 +7,8 @@
|
||||
* mode.c: Handle mode event and show current binding mode in the bar
|
||||
*
|
||||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -14,8 +16,6 @@
|
||||
#include <yajl/yajl_parse.h>
|
||||
#include <yajl/yajl_version.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
/* A datatype to pass through the callbacks to save the state */
|
||||
struct mode_json_params {
|
||||
char *json;
|
||||
|
@ -7,6 +7,8 @@
|
||||
* outputs.c: Maintaining the outputs list
|
||||
*
|
||||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -15,8 +17,6 @@
|
||||
#include <yajl/yajl_parse.h>
|
||||
#include <yajl/yajl_version.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
/* A datatype to pass through the callbacks to save the state */
|
||||
struct outputs_json_params {
|
||||
struct outputs_head *outputs;
|
||||
|
@ -8,6 +8,8 @@
|
||||
* protocol version and features.
|
||||
*
|
||||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
@ -25,8 +27,6 @@
|
||||
#include <yajl/yajl_parse.h>
|
||||
#include <yajl/yajl_version.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
static enum {
|
||||
KEY_VERSION,
|
||||
KEY_STOP_SIGNAL,
|
||||
|
@ -7,6 +7,8 @@
|
||||
* workspaces.c: Maintaining the workspace lists
|
||||
*
|
||||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -14,8 +16,6 @@
|
||||
#include <yajl/yajl_parse.h>
|
||||
#include <yajl/yajl_version.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
/* A datatype to pass through the callbacks to save the state */
|
||||
struct workspaces_json_params {
|
||||
struct ws_head *workspaces;
|
||||
|
@ -7,6 +7,8 @@
|
||||
* xcb.c: Communicating with X
|
||||
*
|
||||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xkb.h>
|
||||
#include <xcb/xproto.h>
|
||||
@ -32,7 +34,6 @@
|
||||
#include <sanitizer/lsan_interface.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include "libi3.h"
|
||||
|
||||
/** This is the equivalent of XC_left_ptr. I’m not sure why xcb doesn’t have a
|
||||
|
Reference in New Issue
Block a user