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

31 lines
553 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
2014-04-21 16:37:44 -04:00
OPTLEVEL?=$(DEFAULT_OPTLEVEL)
2016-02-28 10:46:24 -05:00
CFLAGS?=$(OPTLEVEL)
2014-04-21 16:37:44 -04:00
CPPFLAGS:=$(CPPFLAGS) -DVERSIONSTR=\"$(VERSION)\"
2016-02-28 10:46:24 -05:00
CFLAGS:=$(CFLAGS) -Wall -Wextra
ifeq ($(HOST_IS_SORTIX),0)
CPPFLAGS+=-D_GNU_SOURCE
endif
2014-04-21 16:37:44 -04:00
BINARY:=carray
all: $(BINARY)
.PHONY: all install clean
2014-04-21 16:37:44 -04:00
install: all
mkdir -p $(DESTDIR)$(BINDIR)
install $(BINARY) $(DESTDIR)$(BINDIR)
2016-02-28 10:46:24 -05:00
%: %.c
$(CC) -std=gnu11 $(CFLAGS) $(CPPFLAGS) $< -o $@
2014-04-21 16:37:44 -04:00
clean:
rm -f $(BINARY) *.o