2014-11-06 04:26:33 +00:00
|
|
|
SRCS = \
|
|
|
|
shell/hush.c \
|
|
|
|
shell/match.c \
|
|
|
|
shell/math.c \
|
|
|
|
shell/random.c \
|
|
|
|
shell/shell.common.c \
|
|
|
|
shell/glob.c \
|
2014-11-19 02:51:04 +00:00
|
|
|
shell/fnmatch.c \
|
2014-11-06 04:26:33 +00:00
|
|
|
coreutils/echo.c \
|
|
|
|
coreutils/test.c \
|
|
|
|
coreutils/test.ptr.hack.c \
|
|
|
|
libbb/xfuncs.printf.c \
|
|
|
|
libbb/xfuncs.c \
|
|
|
|
libbb/xgetcwd.c \
|
|
|
|
libbb/getopt32.c \
|
|
|
|
libbb/perror.msg.c \
|
|
|
|
libbb/xatonum.c \
|
|
|
|
libbb/signal.names.c \
|
|
|
|
libbb/error.retval.c \
|
|
|
|
libbb/xfunc.die.c \
|
|
|
|
libbb/safe.strncpy.c \
|
|
|
|
libbb/lineedit.c \
|
|
|
|
libbb/platform.c \
|
|
|
|
libbb/endofname.c \
|
|
|
|
libbb/signals.c \
|
|
|
|
libbb/skip.whitespc.c \
|
|
|
|
libbb/wfopen.c \
|
|
|
|
libbb/verror.msg.c \
|
|
|
|
libbb/bb.strtonum.c \
|
|
|
|
libbb/time.c \
|
|
|
|
libbb/printable.str.c \
|
|
|
|
libbb/full.write.c \
|
|
|
|
libbb/bb.qsort.c \
|
|
|
|
libbb/xrealloc.vec.c \
|
|
|
|
libbb/read.key.c \
|
|
|
|
libbb/unicode.c \
|
|
|
|
libbb/safe.write.c \
|
|
|
|
libbb/read.c \
|
|
|
|
libbb/s.gethostname.c \
|
|
|
|
libbb/get.line.c \
|
|
|
|
libbb/conc.pathfile.c \
|
|
|
|
libbb/last.char.is.c \
|
|
|
|
libbb/safe.poll.c \
|
|
|
|
libbb/escape.seq.c \
|
|
|
|
libbb/cmp.str.array.c \
|
|
|
|
libbb/llist.c \
|
|
|
|
libbb/parse.mode.c \
|
|
|
|
libbb/messages.c \
|
|
|
|
libbb/appletlib.c \
|
|
|
|
libbb/bb.basename.c \
|
|
|
|
libbb/mempcpy.c \
|
|
|
|
libbb/vfork.and.run.c \
|
2014-11-08 05:06:34 +00:00
|
|
|
libbb/poll.c \
|
2014-11-22 05:05:38 +00:00
|
|
|
libbb/get.exec.path.c \
|
2014-12-03 16:46:57 +00:00
|
|
|
libbb/pgrp.c \
|
|
|
|
libbb/qsort.c
|
2014-11-06 04:26:33 +00:00
|
|
|
OBJS = $(SRCS:.c=.o)
|
|
|
|
|
|
|
|
INCLUDES = -I include -I shell -I libbb
|
|
|
|
DEFINES = -Dhush_main=main -DNDEBUG
|
2014-11-12 02:58:06 +00:00
|
|
|
LIBS = -ltermcap
|
2014-11-06 04:26:33 +00:00
|
|
|
|
2014-12-15 22:47:12 +00:00
|
|
|
# CFLAGS suitable for clang or GCC
|
|
|
|
CFLAGS = -std=c89 -funsigned-char -Wall -Wno-comment -Wno-format-security
|
2014-11-06 04:26:33 +00:00
|
|
|
|
|
|
|
PROG = hush
|
|
|
|
|
|
|
|
$(PROG): $(OBJS)
|
2014-11-12 02:58:06 +00:00
|
|
|
$(CC) $(LIBS) $(OBJS) -o $@
|
2014-11-06 04:26:33 +00:00
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(INCLUDES) $(DEFINES) $(CFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
$(RM) $(OBJS) $(PROG)
|