source: rtems/cpukit/score/Makefile.am @ fce900b5

5
Last change on this file since fce900b5 was 2afb22b, checked in by Chris Johns <chrisj@…>, on Dec 23, 2017 at 7:18:56 AM

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

  • Property mode set to 100644
File size: 8.1 KB
Line 
1include $(top_srcdir)/automake/multilib.am
2include $(top_srcdir)/automake/compile.am
3
4_SUBDIRS = cpu
5
6## include
7
8if HAS_MP
9# We only build multiprocessing related files if HAS_MP was defined
10endif
11
12if HAS_SMP
13endif
14
15## src
16
17noinst_LIBRARIES = libscore.a
18libscore_a_SOURCES =
19libscore_a_CPPFLAGS = $(AM_CPPFLAGS)
20
21# We only build multiprocessing related files if HAS_MP was defined
22if HAS_MP
23libscore_a_SOURCES += src/mpci.c src/objectmp.c src/threadmp.c
24endif
25
26if HAS_SMP
27libscore_a_SOURCES += src/percpustatewait.c
28libscore_a_SOURCES += src/profilingsmplock.c
29libscore_a_SOURCES += src/scheduleredfsmp.c
30libscore_a_SOURCES += src/schedulerpriorityaffinitysmp.c
31libscore_a_SOURCES += src/schedulerprioritysmp.c
32libscore_a_SOURCES += src/schedulersimplesmp.c
33libscore_a_SOURCES += src/schedulerstrongapa.c
34libscore_a_SOURCES += src/smp.c
35libscore_a_SOURCES += src/smplock.c
36libscore_a_SOURCES += src/smpmulticastaction.c
37libscore_a_SOURCES += src/schedulerdefaultaskforhelp.c
38libscore_a_SOURCES += src/schedulerdefaultsetaffinity.c
39libscore_a_SOURCES += src/schedulersmp.c
40libscore_a_SOURCES += src/schedulersmpstartidle.c
41endif
42
43## CORE_APIMUTEX_C_FILES
44libscore_a_SOURCES += src/allocatormutex.c
45libscore_a_SOURCES += src/apimutexisowner.c
46libscore_a_SOURCES += src/apimutexlock.c
47libscore_a_SOURCES += src/apimutexunlock.c
48
49## CORE_BARRIER_C_FILES
50libscore_a_SOURCES += src/corebarrier.c src/corebarrierrelease.c \
51    src/corebarrierwait.c
52
53## CORE_MESSAGE_QUEUE_C_FILES
54libscore_a_SOURCES += src/coremsg.c src/coremsgbroadcast.c \
55    src/coremsgclose.c src/coremsgflush.c src/coremsgflushwait.c \
56    src/coremsginsert.c src/coremsgseize.c \
57    src/coremsgsubmit.c
58
59## CORE_MUTEX_C_FILES
60libscore_a_SOURCES += src/coremutexseize.c
61
62## CORE_PERCPU_C_FILES
63libscore_a_SOURCES += src/percpu.c
64libscore_a_SOURCES += src/percpuasm.c
65
66## CORE_RWLOCK_C_FILES
67libscore_a_SOURCES += src/corerwlock.c src/corerwlockobtainread.c \
68    src/corerwlockobtainwrite.c src/corerwlockrelease.c
69
70## CORE_SEMAPHORE_C_FILES
71libscore_a_SOURCES += src/coresem.c
72
73## HEAP_C_FILES
74libscore_a_SOURCES += src/heap.c src/heapallocate.c src/heapextend.c \
75    src/heapfree.c src/heapsizeofuserarea.c src/heapwalk.c src/heapgetinfo.c \
76    src/heapgetfreeinfo.c src/heapresizeblock.c src/heapiterate.c \
77    src/heapgreedy.c src/heapnoextend.c
78
79## OBJECT_C_FILES
80libscore_a_SOURCES += src/objectallocate.c src/objectclose.c \
81    src/objectextendinformation.c src/objectfree.c \
82    src/objectgetnext.c src/objectinitializeinformation.c \
83    src/objectnametoid.c src/objectnametoidstring.c \
84    src/objectshrinkinformation.c src/objectgetnoprotection.c \
85    src/objectidtoname.c src/objectgetnameasstring.c src/objectsetname.c \
86    src/objectgetinfo.c src/objectgetinfoid.c src/objectapimaximumclass.c \
87    src/objectnamespaceremove.c \
88    src/objectactivecount.c
89libscore_a_SOURCES += src/objectgetlocal.c
90
91## SCHEDULER_C_FILES
92libscore_a_SOURCES += src/log2table.c
93libscore_a_SOURCES += src/scheduler.c
94libscore_a_SOURCES += src/schedulergetaffinity.c
95libscore_a_SOURCES += src/schedulersetaffinity.c
96libscore_a_SOURCES += src/schedulerdefaultmappriority.c
97libscore_a_SOURCES += src/schedulerdefaultnodedestroy.c
98libscore_a_SOURCES += src/schedulerdefaultnodeinit.c
99libscore_a_SOURCES += src/schedulerdefaultreleasejob.c
100libscore_a_SOURCES += src/schedulerdefaultschedule.c
101libscore_a_SOURCES += src/schedulerdefaultstartidle.c
102libscore_a_SOURCES += src/schedulerdefaulttick.c
103
104## SCHEDULERPRIORITY_C_FILES
105libscore_a_SOURCES += src/schedulerpriority.c \
106    src/schedulerpriorityblock.c \
107    src/schedulerprioritychangepriority.c \
108    src/schedulerpriorityschedule.c \
109    src/schedulerpriorityunblock.c \
110    src/schedulerpriorityyield.c
111
112## SCHEDULERSIMPLE_C_FILES
113libscore_a_SOURCES += src/schedulersimple.c \
114    src/schedulersimpleblock.c \
115    src/schedulersimplechangepriority.c \
116    src/schedulersimpleschedule.c \
117    src/schedulersimpleunblock.c \
118    src/schedulersimpleyield.c
119
120## SCHEDULEREDF_C_FILES
121libscore_a_SOURCES += src/scheduleredf.c \
122    src/scheduleredfnodeinit.c \
123    src/scheduleredfblock.c \
124    src/scheduleredfchangepriority.c \
125    src/scheduleredfreleasejob.c \
126    src/scheduleredfschedule.c \
127    src/scheduleredfunblock.c \
128    src/scheduleredfyield.c
129
130## SCHEDULERCBS_C_FILES
131libscore_a_SOURCES += src/schedulercbs.c \
132    src/schedulercbsnodeinit.c \
133    src/schedulercbsattachthread.c \
134    src/schedulercbscleanup.c \
135    src/schedulercbscreateserver.c \
136    src/schedulercbsdestroyserver.c \
137    src/schedulercbsdetachthread.c \
138    src/schedulercbsgetapprovedbudget.c \
139    src/schedulercbsgetexecutiontime.c \
140    src/schedulercbsgetparameters.c \
141    src/schedulercbsgetremainingbudget.c \
142    src/schedulercbsgetserverid.c \
143    src/schedulercbssetparameters.c \
144    src/schedulercbsreleasejob.c \
145    src/schedulercbsunblock.c
146
147## PROTECTED_HEAP_C_FILES
148libscore_a_SOURCES += src/pheapallocate.c \
149    src/pheapextend.c src/pheapfree.c src/pheapgetsize.c \
150    src/pheapgetblocksize.c src/pheapgetfreeinfo.c src/pheapgetinfo.c \
151    src/pheapinit.c src/pheapresizeblock.c src/pheapwalk.c src/pheapiterate.c
152
153## FREECHAIN_C_FILES
154libscore_a_SOURCES += src/freechain.c
155
156## RBTREE_C_FILES
157libscore_a_SOURCES += \
158    src/rbtreeextract.c \
159    src/rbtreeinsert.c src/rbtreeiterate.c src/rbtreenext.c
160libscore_a_SOURCES += src/rbtreereplace.c
161
162## THREAD_C_FILES
163libscore_a_SOURCES += src/thread.c src/threadchangepriority.c \
164    src/threadclearstate.c src/threadcreateidle.c \
165    src/threaddispatch.c \
166    src/threadget.c src/threadhandler.c src/threadinitialize.c \
167    src/threadloadenv.c \
168    src/threadrestart.c \
169    src/threadsetstate.c \
170    src/threadstackallocate.c src/threadstackfree.c src/threadstart.c \
171    src/threadstartmultitasking.c src/iterateoverthreads.c
172libscore_a_SOURCES += src/threadentryadaptoridle.c
173libscore_a_SOURCES += src/threadentryadaptornumeric.c
174libscore_a_SOURCES += src/threadentryadaptorpointer.c
175libscore_a_SOURCES += src/threadgetcputimeused.c
176libscore_a_SOURCES += src/threaditerate.c
177libscore_a_SOURCES += src/threadname.c
178libscore_a_SOURCES += src/threadscheduler.c
179libscore_a_SOURCES += src/threadtimeout.c
180libscore_a_SOURCES += src/threadwaitgetid.c
181libscore_a_SOURCES += src/threadyield.c
182
183## THREADQ_C_FILES
184libscore_a_SOURCES += src/threadq.c \
185    src/threadqenqueue.c \
186    src/threadqextractwithproxy.c src/threadqfirst.c \
187    src/threadqflush.c
188libscore_a_SOURCES += src/threadqops.c
189libscore_a_SOURCES += src/threadqtimeout.c
190
191## TIMESPEC_C_FILES
192libscore_a_SOURCES += src/timespecaddto.c src/timespecfromticks.c \
193    src/timespecisvalid.c src/timespeclessthan.c \
194    src/timespecsubtract.c src/timespectoticks.c src/timespecdivide.c \
195    src/timespecdividebyinteger.c src/timespecgetasnanoseconds.c
196
197## TOD_C_FILES
198libscore_a_SOURCES += src/coretod.c src/coretodset.c \
199    src/coretodtickspersec.c \
200    src/coretodadjust.c
201
202## WATCHDOG_C_FILES
203libscore_a_SOURCES += src/watchdoginsert.c
204libscore_a_SOURCES += src/watchdogremove.c
205libscore_a_SOURCES += src/watchdogtick.c
206libscore_a_SOURCES += src/watchdogtickssinceboot.c
207
208## USEREXT_C_FILES
209libscore_a_SOURCES += src/userextaddset.c \
210    src/userext.c src/userextremoveset.c src/userextiterate.c
211
212## STD_C_FILES
213libscore_a_SOURCES += src/chain.c \
214    src/chainnodecount.c \
215    src/debugisthreaddispatchingallowed.c \
216    src/interr.c src/isr.c src/wkspace.c src/wkstringduplicate.c
217libscore_a_SOURCES += src/ioprintf.c
218libscore_a_SOURCES += src/iovprintf.c
219libscore_a_SOURCES += src/isrisinprogress.c
220libscore_a_SOURCES += src/condition.c
221libscore_a_SOURCES += src/futex.c
222libscore_a_SOURCES += src/profilingisrentryexit.c
223libscore_a_SOURCES += src/mutex.c
224libscore_a_SOURCES += src/once.c
225libscore_a_SOURCES += src/sched.c
226libscore_a_SOURCES += src/semaphore.c
227libscore_a_SOURCES += src/smpbarrierwait.c
228libscore_a_SOURCES += src/kern_tc.c
229libscore_a_SOURCES += src/libatomic.c
230libscore_a_SOURCES += src/processormaskcopy.c
231
232EXTRA_DIST = src/Unlimited.txt
233
234# This file is in the build tree
235DISTCLEANFILES = ../..include/rtems/score/cpuopts.h
236include_rtems_scoredir = $(includedir)/rtems/score
237include_rtems_score_HEADERS = ../../include/rtems/score/cpuopts.h
238
239include $(top_srcdir)/automake/subdirs.am
240include $(top_srcdir)/automake/local.am
Note: See TracBrowser for help on using the repository browser.