1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00
sortix--sortix/sh/Makefile

37 lines
700 B
Makefile
Raw Normal View History

2014-12-04 11:39:41 -05:00
SOFTWARE_MEANT_FOR_SORTIX=1
include ../build-aux/platform.mak
include ../build-aux/compiler.mak
include ../build-aux/version.mak
include ../build-aux/dirs.mak
OPTLEVEL?=$(DEFAULT_OPTLEVEL)
2016-02-28 17:38:08 -05:00
CFLAGS?=$(OPTLEVEL)
2014-12-04 11:39:41 -05:00
CPPFLAGS:=$(CPPFLAGS) -DVERSIONSTR=\"$(VERSION)\"
2016-02-28 17:38:08 -05:00
CFLAGS:=$(CFLAGS) -Wall -Wextra
2014-12-04 11:39:41 -05:00
BINARIES:=sh sortix-sh
2015-04-02 09:56:33 -04:00
SORTIX_SH_SRCS=\
2016-02-28 17:38:08 -05:00
editline.c \
sh.c \
showline.c \
util.c
2015-04-02 09:56:33 -04:00
2014-12-04 11:39:41 -05:00
all: $(BINARIES)
.PHONY: all install clean
install: all
mkdir -p $(DESTDIR)$(BINDIR)
install $(BINARIES) $(DESTDIR)$(BINDIR)
2015-04-02 09:56:33 -04:00
sortix-sh: $(SORTIX_SH_SRCS) *.h
2016-02-28 17:38:08 -05:00
$(CC) -std=gnu11 $(CFLAGS) $(CPPFLAGS) $(SORTIX_SH_SRCS) -o $@
2014-12-04 11:39:41 -05:00
2016-02-28 17:38:08 -05:00
sh: proper-sh.c
$(CC) -std=gnu11 $(CFLAGS) $(CPPFLAGS) $< -o $@
2014-12-04 11:39:41 -05:00
clean:
rm -f $(BINARIES) *.o