1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00
sortix--sortix/libpthread/Makefile
2015-05-10 16:56:22 +02:00

96 lines
2 KiB
Makefile

SOFTWARE_MEANT_FOR_SORTIX=1
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:=$(CPPFLAGS) -D__is_sortix_libpthread -I include
CXXFLAGS:=$(CXXFLAGS) -Wall -Wextra -fno-exceptions -fno-rtti
OBJS=\
pthread_attr_destroy.o \
pthread_attr_getdetachstate.o \
pthread_attr_getstacksize.o \
pthread_attr_init.o \
pthread_attr_setdetachstate.o \
pthread_attr_setstacksize.o \
pthread_condattr_destroy.o \
pthread_condattr_getclock.o \
pthread_condattr_init.o \
pthread_condattr_setclock.o \
pthread_cond_broadcast.o \
pthread_cond_destroy.o \
pthread_cond_init.o \
pthread_cond_signal.o \
pthread_cond_timedwait.o \
pthread_cond_wait.o \
pthread_create.o \
pthread_detach.o \
pthread_equal.o \
pthread_exit.o \
pthread_getspecific.o \
pthread_initialize.o \
pthread_join.o \
pthread_key_create.o \
pthread_key_delete.o \
pthread_mutexattr_destroy.o \
pthread_mutexattr_gettype.o \
pthread_mutexattr_init.o \
pthread_mutexattr_settype.o \
pthread_mutex_destroy.o \
pthread_mutex_init.o \
pthread_mutex_lock.o \
pthread_mutex_trylock.o \
pthread_mutex_unlock.o \
pthread_once.o \
pthread_rwlock_destroy.o \
pthread_rwlock_init.o \
pthread_rwlock_rdlock.o \
pthread_rwlock_tryrdlock.o \
pthread_rwlock_trywrlock.o \
pthread_rwlock_unlock.o \
pthread_rwlock_wrlock.o \
pthread_self.o \
pthread_setspecific.o \
pthread_sigmask.o \
sem_destroy.o \
sem_getvalue.o \
sem_init.o \
sem_post.o \
sem_timedwait.o \
sem_trywait.o \
sem_wait.o \
BINS:=libpthread.a
# Main build rules.
all: $(BINS)
.PHONY: headers clean install install-headers libs install-libs
headers:
libs: $(BINS)
libpthread.a: $(OBJS)
$(AR) rcs $@ $(OBJS)
%.o: %.c++
$(CXX) -std=gnu++11 -c $< -o $@ $(CPPFLAGS) $(CXXFLAGS)
clean:
rm -f $(BINS) $(OBJS) *.o
# Installation into sysroot.
install: install-headers install-libs
install-headers: headers
cp -RTv include $(DESTDIR)$(INCLUDEDIR)
install-libs:
mkdir -p $(DESTDIR)$(LIBDIR)
cp -P libpthread.a $(DESTDIR)$(LIBDIR)