mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
32 lines
628 B
Makefile
32 lines
628 B
Makefile
include ../build-aux/platform.mak
|
|
include ../build-aux/compiler.mak
|
|
include ../build-aux/version.mak
|
|
include ../build-aux/dirs.mak
|
|
|
|
OPTLEVEL?=$(DEFAULT_OPTLEVEL)
|
|
CXXFLAGS?=$(OPTLEVEL)
|
|
|
|
CPPFLAGS:=$(CPPFLAGS) -DVERSIONSTR=\"$(VERSION)\"
|
|
CXXFLAGS:=$(CXXFLAGS) -Wall -Wextra -fno-exceptions -fno-rtti
|
|
|
|
BINARY=init
|
|
|
|
OBJS=\
|
|
init.o \
|
|
|
|
all: $(BINARY)
|
|
|
|
.PHONY: all install clean
|
|
|
|
$(BINARY): $(OBJS)
|
|
$(CXX) $(OBJS) -o $(BINARY) $(CXXFLAGS) $(LIBS)
|
|
|
|
%.o: %.c++
|
|
$(CXX) -std=gnu++11 $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
|
|
|
|
install: all
|
|
mkdir -p $(DESTDIR)$(BINDIR)
|
|
install $(BINARY) $(DESTDIR)$(BINDIR)
|
|
|
|
clean:
|
|
rm -f $(BINARY) $(OBJS) *.o
|