mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-01 10:22:48 +02:00
Changed everything to use autotools.
This commit is contained in:
parent
ce7446fd4c
commit
8b4338fc90
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,7 +1,6 @@
|
|||||||
/.deps/
|
.deps
|
||||||
/Makefile
|
Makefile
|
||||||
/Makefile.in
|
Makefile.in
|
||||||
|
|
||||||
jzboot
|
jzboot
|
||||||
*.o
|
*.o
|
||||||
*.d
|
*.d
|
||||||
|
@ -1,3 +1 @@
|
|||||||
bin_PROGRAMS = jzboot
|
SUBDIRS = src
|
||||||
jzboot:
|
|
||||||
$(MAKE) -C ./src
|
|
31
src/Makefile
31
src/Makefile
@ -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
5
src/Makefile.am
Normal 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
|
@ -17,9 +17,10 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#ifdef WITH_READLINE
|
#ifdef HAVE_LIBREADLINE
|
||||||
#include <readline/readline.h>
|
#include <readline/readline.h>
|
||||||
#include <readline/history.h>
|
#include <readline/history.h>
|
||||||
#endif
|
#endif
|
||||||
@ -51,7 +52,7 @@ static const struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
shell_context_t *shell_init(void *ingenic) {
|
shell_context_t *shell_init(void *ingenic) {
|
||||||
#ifdef WITH_READLINE
|
#ifdef HAVE_LIBREADLINE
|
||||||
rl_initialize();
|
rl_initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -303,7 +304,7 @@ int shell_source(shell_context_t *ctx, const char *filename) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_READLINE
|
#ifdef HAVE_LIBREADLINE
|
||||||
static shell_context_t *completion_context;
|
static shell_context_t *completion_context;
|
||||||
static char **completion_matches;
|
static char **completion_matches;
|
||||||
static int completion_matches_count = 0;
|
static int completion_matches_count = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user