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

57 lines
1,011 B
Makefile
Raw Normal View History

2014-06-28 10:10:20 -04:00
include ../build-aux/platform.mak
include ../build-aux/compiler.mak
include ../build-aux/version.mak
include ../build-aux/dirs.mak
2013-03-26 07:40:43 -04:00
OPTLEVEL?=$(DEFAULT_OPTLEVEL)
2016-02-28 18:10:59 -05:00
CFLAGS?=$(OPTLEVEL)
2013-03-26 07:40:43 -04:00
2016-02-28 18:10:59 -05:00
CFLAGS:=$(CFLAGS) -Wall -Wextra
CPPFLAGS:=$(CPPFLAGS) -DVERSIONSTR=\"$(VERSION)\"
2016-02-28 18:10:59 -05:00
ifeq ($(HOST_IS_SORTIX),0)
CPPFLAGS+=-D_GNU_SOURCE
endif
2013-03-26 07:40:43 -04:00
BINARIES:=\
porttix-create \
srctix-create \
tix \
tix-build \
tix-collection \
tix-execdiff \
tix-execpatch \
tix-install \
tix-rmpatch \
PROGRAMS:=\
$(BINARIES) \
tix-eradicate-libtool-la \
tix-iso-add \
tix-iso-bootconfig \
tix-iso-liveconfig \
MANPAGES8=\
tix-iso-add.8 \
tix-iso-bootconfig.8 \
tix-iso-liveconfig.8 \
2013-03-26 07:40:43 -04:00
all: $(PROGRAMS)
.PHONY: all install clean
2016-02-28 18:10:59 -05:00
%: %.c util.h
$(CC) -std=gnu11 $(CFLAGS) $(CPPFLAGS) $< -o $@
2013-03-26 07:40:43 -04:00
2015-12-28 20:31:26 -05:00
$(DESTDIR)$(SBINDIR):
2013-03-26 07:40:43 -04:00
mkdir -p $@
2015-12-28 20:31:26 -05:00
install: all $(DESTDIR)$(SBINDIR)
install $(PROGRAMS) $(DESTDIR)$(SBINDIR)
mkdir -p $(DESTDIR)$(MANDIR)/man8
mkdir -p $(DESTDIR)$(MANDIR)/man8
cp $(MANPAGES8) $(DESTDIR)$(MANDIR)/man8
2013-03-26 07:40:43 -04:00
clean:
rm -f $(BINARIES)