[811804fe] | 1 | ## |
---|
| 2 | ## $Id$ |
---|
| 3 | ## |
---|
[e1d8abb] | 4 | |
---|
[78c2a97] | 5 | ACLOCAL_AMFLAGS = -I ../aclocal |
---|
[e1d8abb] | 6 | |
---|
[2aab7ae9] | 7 | include $(top_srcdir)/../automake/multilib.am |
---|
| 8 | include $(top_srcdir)/../automake/compile.am |
---|
| 9 | include $(top_srcdir)/../automake/lib.am |
---|
| 10 | |
---|
| 11 | EXTRA_DIST = |
---|
| 12 | |
---|
| 13 | $(PROJECT_INCLUDE): |
---|
| 14 | @$(mkinstalldirs) $@ |
---|
| 15 | $(PROJECT_INCLUDE)/rtems/posix: |
---|
| 16 | @$(mkinstalldirs) $@ |
---|
| 17 | |
---|
| 18 | $(PROJECT_INCLUDE)/%.h: include/%.h |
---|
| 19 | $(INSTALL_DATA) $< $@ |
---|
| 20 | $(PROJECT_INCLUDE)/%.inl: $(INLINEdir)/%.inl |
---|
| 21 | $(INSTALL_DATA) $< $@ |
---|
| 22 | |
---|
| 23 | PREINSTALL_FILES = $(PROJECT_INCLUDE) |
---|
| 24 | PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix |
---|
| 25 | |
---|
| 26 | # include |
---|
| 27 | |
---|
| 28 | noinst_HEADERS = include/devctl.h include/intr.h |
---|
| 29 | |
---|
| 30 | include_HEADERS = include/sched.h include/aio.h include/mqueue.h include/semaphore.h |
---|
| 31 | |
---|
| 32 | PREINSTALL_FILES += $(include_HEADERS:include/%=$(PROJECT_INCLUDE)/%) |
---|
| 33 | |
---|
| 34 | # include/rtems/posix |
---|
| 35 | |
---|
| 36 | include_rtems_posixdir = $(includedir)/rtems/posix |
---|
| 37 | |
---|
| 38 | include_H_FILES = include/rtems/posix/cancel.h include/rtems/posix/cond.h include/rtems/posix/config.h \ |
---|
| 39 | include/rtems/posix/key.h include/rtems/posix/mqueue.h include/rtems/posix/mutex.h \ |
---|
| 40 | include/rtems/posix/posixapi.h include/rtems/posix/priority.h include/rtems/posix/psignal.h \ |
---|
| 41 | include/rtems/posix/pthread.h include/rtems/posix/ptimer.h include/rtems/posix/semaphore.h \ |
---|
| 42 | include/rtems/posix/threadsup.h include/rtems/posix/time.h include/rtems/posix/timer.h |
---|
| 43 | PREINSTALL_FILES += $(include_H_FILES:include/%=$(PROJECT_INCLUDE)/%) |
---|
| 44 | include_rtems_posix_HEADERS = $(include_H_FILES) |
---|
| 45 | |
---|
| 46 | include_MP_H_FILES = include/rtems/posix/condmp.h include/rtems/posix/mqueuemp.h include/rtems/posix/mutexmp.h \ |
---|
| 47 | include/rtems/posix/pthreadmp.h include/rtems/posix/semaphoremp.h |
---|
| 48 | if HAS_MP |
---|
| 49 | PREINSTALL_FILES += $(include_MP_H_FILES:include/%=$(PROJECT_INCLUDE)/%) |
---|
| 50 | include_rtems_posix_HEADERS += $(include_MP_H_FILES) |
---|
| 51 | endif |
---|
| 52 | |
---|
| 53 | noinst_HEADERS += include/rtems/posix/intr.h include/rtems/posix/threadsup.h |
---|
| 54 | noinst_HEADERS += $(include_H_FILES) $(include_MP_H_FILES) |
---|
| 55 | |
---|
| 56 | PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix \ |
---|
| 57 | $(include_rtems_posix_HEADERS:include/%=$(PROJECT_INCLUDE)/%) |
---|
| 58 | |
---|
| 59 | ## inline |
---|
| 60 | |
---|
| 61 | inline_H_FILES = inline/rtems/posix/cond.inl inline/rtems/posix/key.inl \ |
---|
| 62 | inline/rtems/posix/mqueue.inl inline/rtems/posix/mutex.inl \ |
---|
| 63 | inline/rtems/posix/pthread.inl inline/rtems/posix/priority.inl \ |
---|
| 64 | inline/rtems/posix/semaphore.inl inline/rtems/posix/timer.inl |
---|
| 65 | noinst_HEADERS += inline/rtems/posix/intr.inl $(inline_H_FILES) |
---|
| 66 | |
---|
| 67 | if INLINE |
---|
| 68 | PREINSTALL_FILES += $(inline_H_FILES:inline/%=$(PROJECT_INCLUDE)/%) |
---|
| 69 | include_rtems_posix_HEADERS += $(inline_H_FILES) |
---|
| 70 | endif |
---|
| 71 | |
---|
| 72 | ## macros |
---|
| 73 | |
---|
| 74 | macros_H_FILES = macros/rtems/posix/cond.inl macros/rtems/posix/key.inl \ |
---|
| 75 | macros/rtems/posix/mqueue.inl macros/rtems/posix/mutex.inl \ |
---|
| 76 | macros/rtems/posix/pthread.inl macros/rtems/posix/priority.inl \ |
---|
| 77 | macros/rtems/posix/semaphore.inl macros/rtems/posix/timer.inl |
---|
| 78 | noinst_HEADERS += macros/rtems/posix/intr.inl $(macros_H_FILES) |
---|
| 79 | |
---|
| 80 | if MACROS |
---|
| 81 | PREINSTALL_FILES += $(macros_H_FILES:macros/%=$(PROJECT_INCLUDE)/%) |
---|
| 82 | include_rtems_posix_HEADERS += $(macros_H_FILES) |
---|
| 83 | endif |
---|
| 84 | |
---|
| 85 | ## src |
---|
| 86 | LIB=$(ARCH)/libposix.a |
---|
| 87 | |
---|
| 88 | # following are semi-implemented and untested |
---|
| 89 | UNUSED_C_FILES = src/devctl.c src/intr.c |
---|
| 90 | |
---|
| 91 | # These are really in the stand but not really functional |
---|
| 92 | BUILD_FOR_NOW_C_FILES = src/aio.c |
---|
| 93 | |
---|
| 94 | ENOSYS_C_FILES = src/execl.c src/execle.c src/execlp.c src/execv.c src/execve.c src/execvp.c src/fork.c \ |
---|
| 95 | src/pthreadatfork.c src/wait.c src/waitpid.c |
---|
| 96 | |
---|
| 97 | CANCEL_C_FILES = src/cancel.c src/cancelrun.c src/cleanuppop.c src/cleanuppush.c \ |
---|
| 98 | src/setcancelstate.c src/setcanceltype.c src/testcancel.c |
---|
| 99 | |
---|
| 100 | CONDITION_VARIABLE_C_FILES = src/cond.c src/condattrdestroy.c src/condattrgetpshared.c \ |
---|
| 101 | src/condattrinit.c src/condattrsetpshared.c src/condbroadcast.c \ |
---|
| 102 | src/conddefaultattributes.c src/conddestroy.c src/condinit.c src/condmp.c src/condsignal.c \ |
---|
| 103 | src/condsignalsupp.c src/condtimedwait.c src/condwait.c src/condwaitsupp.c |
---|
| 104 | |
---|
| 105 | ID_C_FILES = src/getegid.c src/geteuid.c src/getgid.c src/getgroups.c src/getlogin.c src/getpgrp.c \ |
---|
| 106 | src/getpid.c src/getppid.c src/getuid.c src/setpgid.c src/setsid.c |
---|
| 107 | |
---|
| 108 | KEY_C_FILES = src/key.c src/keycreate.c src/keydelete.c src/keygetspecific.c \ |
---|
| 109 | src/keyrundestructors.c src/keysetspecific.c |
---|
| 110 | |
---|
| 111 | MEMORY_C_FILES = src/getpagesize.c src/mprotect.c |
---|
| 112 | |
---|
| 113 | MESSAGE_QUEUE_C_FILES = src/mqueue.c src/mqueueclose.c src/mqueuecreatesupp.c \ |
---|
| 114 | src/mqueuedeletesupp.c src/mqueuegetattr.c src/mqueuenametoid.c src/mqueuenotify.c \ |
---|
| 115 | src/mqueueopen.c src/mqueuereceive.c src/mqueuerecvsupp.c src/mqueuesend.c \ |
---|
| 116 | src/mqueuesendsupp.c src/mqueuesetattr.c src/mqueuetimedreceive.c src/mqueuetimedsend.c \ |
---|
| 117 | src/mqueuetranslatereturncode.c src/mqueueunlink.c |
---|
| 118 | |
---|
| 119 | MUTEX_C_FILES = src/mutex.c src/mutexattrdestroy.c src/mutexattrgetprioceiling.c \ |
---|
| 120 | src/mutexattrgetprotocol.c src/mutexattrgetpshared.c src/mutexattrinit.c \ |
---|
| 121 | src/mutexattrsetprioceiling.c src/mutexattrsetprotocol.c src/mutexattrsetpshared.c \ |
---|
| 122 | src/mutexdefaultattributes.c src/mutexdestroy.c src/mutexfromcorestatus.c \ |
---|
| 123 | src/mutexgetprioceiling.c src/mutexinit.c src/mutexlock.c src/mutexlocksupp.c src/mutexmp.c \ |
---|
| 124 | src/mutexsetprioceiling.c src/mutextimedlock.c src/mutextrylock.c src/mutexunlock.c |
---|
| 125 | |
---|
| 126 | PTHREAD_C_FILES = src/pthread.c src/pthreadsetcputime.c src/pthreadgetcputime.c \ |
---|
| 127 | src/pthreadgetcpuclockid.c src/pthreadonce.c src/pthreadequal.c src/pthreadself.c \ |
---|
| 128 | src/pthreadexit.c src/pthreaddetach.c src/pthreadjoin.c src/pthreadcreate.c \ |
---|
| 129 | src/pthreadattrsetdetachstate.c src/pthreadattrgetdetachstate.c \ |
---|
| 130 | src/pthreadattrgetstackaddr.c src/pthreadattrsetstackaddr.c \ |
---|
| 131 | src/pthreadattrgetstacksize.c src/pthreadattrsetstacksize.c src/pthreadattrinit.c \ |
---|
| 132 | src/pthreadattrdestroy.c src/pthreadsetschedparam.c src/pthreadgetschedparam.c \ |
---|
| 133 | src/pthreadattrsetschedparam.c src/pthreadattrgetschedparam.c \ |
---|
| 134 | src/pthreadattrgetschedpolicy.c src/pthreadattrsetschedpolicy.c \ |
---|
| 135 | src/pthreadattrgetinheritsched.c src/pthreadattrsetinheritsched.c \ |
---|
| 136 | src/pthreadattrgetscope.c src/pthreadattrsetscope.c |
---|
| 137 | |
---|
| 138 | PSIGNAL_C_FILES = src/psignal.c src/alarm.c src/kill.c src/killinfo.c src/pause.c \ |
---|
| 139 | src/psignalclearprocesssignals.c src/psignalsetprocesssignals.c \ |
---|
| 140 | src/psignalchecksignal.c src/psignalclearsignals.c src/psignalunblockthread.c \ |
---|
| 141 | src/pthreadkill.c src/pthreadsigmask.c src/sigaction.c src/sigaddset.c src/sigdelset.c \ |
---|
| 142 | src/sigemptyset.c src/sigfillset.c src/sigismember.c src/sigpending.c src/sigprocmask.c \ |
---|
| 143 | src/sigqueue.c src/sigsuspend.c src/sigtimedwait.c src/sigwait.c src/sigwaitinfo.c \ |
---|
| 144 | src/signal_2.c |
---|
| 145 | |
---|
| 146 | SEMAPHORE_C_FILES = src/semaphore.c src/semaphorecreatesupp.c src/semaphoredeletesupp.c \ |
---|
| 147 | src/semaphoremp.c src/semaphorenametoid.c src/semaphorewaitsupp.c src/semclose.c \ |
---|
| 148 | src/semdestroy.c src/semgetvalue.c src/seminit.c src/semopen.c src/sempost.c src/semtimedwait.c \ |
---|
| 149 | src/semtrywait.c src/semunlink.c src/semwait.c |
---|
| 150 | |
---|
| 151 | TIME_C_FILES = src/adjtime.c src/time.c src/posixtimespecsubtract.c \ |
---|
| 152 | src/posixtimespectointerval.c src/posixintervaltotimespec.c src/clockgetcpuclockid.c \ |
---|
| 153 | src/clockgetenableattr.c src/clockgetres.c src/clockgettime.c src/clocksetenableattr.c \ |
---|
| 154 | src/clocksettime.c src/nanosleep.c src/sleep.c |
---|
| 155 | |
---|
| 156 | # the timer manager needs to be split further but only after its |
---|
| 157 | # dependence on the Classic API Timer Manager is removed. |
---|
| 158 | TIMER_C_FILES = src/ptimer.c src/ptimer1.c |
---|
| 159 | |
---|
| 160 | EXTRA_DIST += src/README.mqueue |
---|
| 161 | |
---|
| 162 | C_FILES = src/adasupp.c $(CANCEL_C_FILES) $(CONDITION_VARIABLE_C_FILES) \ |
---|
| 163 | $(ID_C_FILES) $(KEY_C_FILES) $(MEMORY_C_FILES) $(MESSAGE_QUEUE_C_FILES) \ |
---|
| 164 | $(MUTEX_C_FILES) $(PTHREAD_C_FILES) $(PSIGNAL_C_FILES) src/sched.c \ |
---|
| 165 | $(SEMAPHORE_C_FILES) src/sysconf.c $(TIME_C_FILES) $(TIMER_C_FILES) src/types.c \ |
---|
| 166 | $(ENOSYS_C_FILES) $(BUILD_FOR_NOW_C_FILES) |
---|
| 167 | OBJS = $(C_FILES:src/%.c=${ARCH}/%.$(OBJEXT)) |
---|
| 168 | |
---|
| 169 | # |
---|
| 170 | # Add local stuff here using += |
---|
| 171 | # |
---|
| 172 | |
---|
| 173 | AM_CPPFLAGS += -Isrc -D__RTEMS_INSIDE__ |
---|
| 174 | |
---|
| 175 | all-local: ${ARCH} $(PREINSTALL_FILES) $(LIB) |
---|
| 176 | |
---|
| 177 | $(LIB): ${OBJS} |
---|
| 178 | $(make-library) |
---|
| 179 | |
---|
| 180 | ${ARCH}/%.$(OBJEXT): src/%.c |
---|
| 181 | ${COMPILE} -o $@ -c $< |
---|
| 182 | |
---|
| 183 | # temporary so we can see how many things are left to implement |
---|
| 184 | not: |
---|
| 185 | grep -i NOT_IMPL $(C_FILES:%=$(srcdir)/%) | grep -v MP_NOT_IMPL |
---|
| 186 | @echo |
---|
| 187 | @echo |
---|
| 188 | @echo |
---|
| 189 | @echo `grep -i NOT_IMPL $(C_FILES:%=$(srcdir)/%) | grep -v MP_NOT_IMPL | wc -l ` places marked not implemented |
---|
| 190 | @echo `wc -l $(C_FILES:%=$(srcdir)/%) | grep total` lines of C code to test |
---|
| 191 | |
---|
| 192 | EXTRA_DIST += $(C_FILES) $(UNUSED_C_FILES) |
---|
[e1d8abb] | 193 | |
---|
[78c2a97] | 194 | include $(top_srcdir)/../automake/local.am |
---|