1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-01 08:22:47 +02:00

Changed everything to use autotools.

This commit is contained in:
Peter Zotov 2011-04-05 19:53:12 +04:00
parent ce7446fd4c
commit 8b4338fc90
5 changed files with 13 additions and 41 deletions

7
.gitignore vendored
View File

@ -1,7 +1,6 @@
/.deps/
/Makefile
/Makefile.in
.deps
Makefile
Makefile.in
jzboot
*.o
*.d

View File

@ -1,3 +1 @@
bin_PROGRAMS = jzboot
jzboot:
$(MAKE) -C ./src
SUBDIRS = src

View File

@ -1,31 +0,0 @@
READLINE ?= 0
ifneq (${READLINE},0)
LIBS += -lreadline
CPPFLAGS += -DWITH_READLINE
endif
CC = gcc
TARGET = ../jzboot
SOURCES = debug.c devmgr.c ingenic.c main.c shell_lex.c usbdev.c shell.c shell_builtins.c config.c spl_cmdset.c usbboot_cmdset.c
CFLAGS = --std=gnu99 -Wall -I../include -O2 $(shell pkg-config libusb-1.0 --cflags)
LIBS += $(shell pkg-config libusb-1.0 --libs)
OBJECTS = ${SOURCES:.c=.o}
all: ${TARGET}
${TARGET}: ${OBJECTS}
${CC} ${LDFLAGS} -o $@ $^ ${LIBS}
clean:
rm -f ${TARGET} ${OBJECTS} ${SOURCES:.c=.d}
%.o: %.c
${CC} ${CPPFLAGS} ${CFLAGS} -o $@ -MD -c $<
%.c: %.l
flex -o $@ $<
-include ${SOURCES:.c=.d}

5
src/Makefile.am Normal file
View File

@ -0,0 +1,5 @@
AM_CFLAGS = --std=gnu99 -Wall -I../include
bin_PROGRAMS = jzboot
jzboot_SOURCES = debug.c devmgr.c ingenic.c main.c shell_lex.c \
usbdev.c shell.c shell_builtins.c config.c spl_cmdset.c usbboot_cmdset.c

View File

@ -17,9 +17,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <string.h>
#include <stdio.h>
#ifdef WITH_READLINE
#ifdef HAVE_LIBREADLINE
#include <readline/readline.h>
#include <readline/history.h>
#endif
@ -51,7 +52,7 @@ static const struct {
};
shell_context_t *shell_init(void *ingenic) {
#ifdef WITH_READLINE
#ifdef HAVE_LIBREADLINE
rl_initialize();
#endif
@ -303,7 +304,7 @@ int shell_source(shell_context_t *ctx, const char *filename) {
return 0;
}
#ifdef WITH_READLINE
#ifdef HAVE_LIBREADLINE
static shell_context_t *completion_context;
static char **completion_matches;
static int completion_matches_count = 0;