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

54 lines
1.1 KiB
Makefile
Raw Normal View History

SOFTWARE_MEANT_FOR_SORTIX=1
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
OPTLEVEL?=$(DEFAULT_OPTLEVEL)
2016-02-28 10:38:02 -05:00
CFLAGS?=$(OPTLEVEL)
2016-02-28 10:38:02 -05:00
CFLAGS:=$(CFLAGS) -Wall -Wextra
CPPFLAGS:=$(CPPFLAGS) -I include
CLIENT_OBJS:=\
client/library.o \
client/session.o \
client/window.o \
2016-02-28 10:38:02 -05:00
BINS:=client/libdispd.a
all: $(BINS)
2016-02-28 10:38:02 -05:00
.PHONY: all headers client clean install install-include-dirs \
install-headers install-client-dirs install-client
headers:
client: client/libdispd.a
client/libdispd.a: $(CLIENT_OBJS)
$(AR) rcs $@ $(CLIENT_OBJS)
clean:
2016-02-28 10:38:02 -05:00
rm -f $(CLIENT_OBJS)
rm -f $(BINS)
2016-02-28 10:38:02 -05:00
rm -f *.o client/*.o
2016-02-28 10:38:02 -05:00
%.o: %.c
$(CC) -std=gnu11 $(CFLAGS) $(CPPFLAGS) -c $< -o $@
# Installation into sysroot
2016-02-28 10:38:02 -05:00
install: install-headers install-client
install-include-dirs: headers
mkdir -p $(DESTDIR)$(INCLUDEDIR)
install-headers: install-include-dirs headers
cp -RTv include $(DESTDIR)$(INCLUDEDIR)
install-client-dirs:
mkdir -p $(DESTDIR)$(LIBDIR)
install-client: install-client-dirs client
cp -P client/libdispd.a $(DESTDIR)$(LIBDIR)