2013-03-19 18:28:32 -04:00
|
|
|
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
|
2012-12-15 20:11:18 -05:00
|
|
|
|
2014-04-13 16:34:36 -04:00
|
|
|
OPTLEVEL?=$(DEFAULT_OPTLEVEL)
|
2016-02-28 10:38:02 -05:00
|
|
|
CFLAGS?=$(OPTLEVEL)
|
2012-12-15 20:11:18 -05:00
|
|
|
|
2016-02-28 10:38:02 -05:00
|
|
|
CFLAGS:=$(CFLAGS) -Wall -Wextra
|
2012-12-15 20:11:18 -05:00
|
|
|
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
|
2012-12-15 20:11:18 -05:00
|
|
|
|
|
|
|
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
|
2012-12-15 20:11:18 -05:00
|
|
|
|
|
|
|
headers:
|
|
|
|
|
|
|
|
client: client/libdispd.a
|
|
|
|
|
|
|
|
client/libdispd.a: $(CLIENT_OBJS)
|
2014-04-13 16:34:36 -04:00
|
|
|
$(AR) rcs $@ $(CLIENT_OBJS)
|
2012-12-15 20:11:18 -05:00
|
|
|
|
|
|
|
clean:
|
2016-02-28 10:38:02 -05:00
|
|
|
rm -f $(CLIENT_OBJS)
|
2012-12-15 20:11:18 -05:00
|
|
|
rm -f $(BINS)
|
2016-02-28 10:38:02 -05:00
|
|
|
rm -f *.o client/*.o
|
2012-12-15 20:11:18 -05:00
|
|
|
|
2016-02-28 10:38:02 -05:00
|
|
|
%.o: %.c
|
|
|
|
$(CC) -std=gnu11 $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
2012-12-15 20:11:18 -05:00
|
|
|
|
|
|
|
# Installation into sysroot
|
2016-02-28 10:38:02 -05:00
|
|
|
install: install-headers install-client
|
2012-12-15 20:11:18 -05:00
|
|
|
|
|
|
|
install-include-dirs: headers
|
2013-03-19 18:28:32 -04:00
|
|
|
mkdir -p $(DESTDIR)$(INCLUDEDIR)
|
2012-12-15 20:11:18 -05:00
|
|
|
|
|
|
|
install-headers: install-include-dirs headers
|
2013-03-19 18:28:32 -04:00
|
|
|
cp -RTv include $(DESTDIR)$(INCLUDEDIR)
|
2012-12-15 20:11:18 -05:00
|
|
|
|
|
|
|
install-client-dirs:
|
2013-03-19 18:28:32 -04:00
|
|
|
mkdir -p $(DESTDIR)$(LIBDIR)
|
2012-12-15 20:11:18 -05:00
|
|
|
|
2013-03-19 18:28:32 -04:00
|
|
|
install-client: install-client-dirs client
|
|
|
|
cp -P client/libdispd.a $(DESTDIR)$(LIBDIR)
|