Makefile.tests 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. CLEANUP_TYPE=C
  2. #CLEANUP_TYPE=CPP
  3. VPATH = ../../tests
  4. TARGET = pthread-psp-test
  5. MUTEX_TEST_OBJS = \
  6. mutex1.o \
  7. mutex1e.o \
  8. mutex1n.o \
  9. mutex1r.o \
  10. mutex2.o \
  11. mutex2e.o \
  12. mutex2r.o \
  13. mutex3.o \
  14. mutex3e.o \
  15. mutex3r.o \
  16. mutex4.o \
  17. mutex5.o \
  18. mutex6.o \
  19. mutex6e.o \
  20. mutex6es.o \
  21. mutex6n.o \
  22. mutex6r.o \
  23. mutex6rs.o \
  24. mutex6s.o \
  25. mutex7.o \
  26. mutex7e.o \
  27. mutex7n.o \
  28. mutex7r.o \
  29. mutex8.o \
  30. mutex8e.o \
  31. mutex8n.o \
  32. mutex8r.o
  33. MISC_OBJS = \
  34. main.o \
  35. test_main.o
  36. MISC_TEST_OBJS = \
  37. valid1.o \
  38. valid2.o \
  39. self1.o \
  40. self2.o \
  41. equal1.o \
  42. count1.o \
  43. delay1.o \
  44. delay2.o \
  45. errno1.o \
  46. tsd1.o \
  47. tsd2.o \
  48. stress1.o \
  49. detach1.o
  50. SEM_TEST_OBJS = \
  51. semaphore1.o \
  52. semaphore2.o \
  53. semaphore3.o \
  54. semaphore4.o \
  55. semaphore4t.o \
  56. semaphore5.o \
  57. semaphore6.o
  58. BARRIER_TEST_OBJS = \
  59. barrier1.o \
  60. barrier2.o \
  61. barrier3.o \
  62. barrier4.o \
  63. barrier5.o
  64. # Tests excluded because cancellation is not implemented
  65. # semaphore4.o
  66. # semaphore4t.o
  67. THREAD_TEST_OBJS = \
  68. create1.o \
  69. create2.o \
  70. create3.o \
  71. join0.o \
  72. join1.o \
  73. join2.o \
  74. join3.o \
  75. join4.o \
  76. kill1.o \
  77. once1.o \
  78. once2.o \
  79. once3.o \
  80. once4.o \
  81. exit1.o \
  82. exit2.o \
  83. exit3.o \
  84. exit4.o \
  85. exit5.o \
  86. reuse1.o \
  87. reuse2.o \
  88. priority1.o \
  89. priority2.o \
  90. inherit1.o
  91. SPIN_TEST_OBJS = \
  92. spin1.o \
  93. spin2.o \
  94. spin3.o \
  95. spin4.o
  96. CONDVAR_TEST_OBJS = \
  97. condvar1.o \
  98. condvar1_1.o \
  99. condvar1_2.o \
  100. condvar2.o \
  101. condvar2_1.o \
  102. condvar3.o \
  103. condvar3_1.o \
  104. condvar3_2.o \
  105. condvar3_3.o \
  106. condvar4.o \
  107. condvar5.o \
  108. condvar6.o \
  109. condvar8.o \
  110. condvar7.o \
  111. condvar9.o
  112. RWLOCK_TEST_OBJS = \
  113. rwlock1.o \
  114. rwlock2.o \
  115. rwlock2_t.o \
  116. rwlock3.o \
  117. rwlock3_t.o \
  118. rwlock4.o \
  119. rwlock4_t.o \
  120. rwlock5.o \
  121. rwlock5_t.o \
  122. rwlock6.o \
  123. rwlock6_t.o \
  124. rwlock6_t2.o \
  125. rwlock7.o \
  126. rwlock8.o
  127. CANCEL_TEST_OBJS = \
  128. cancel1.o \
  129. cancel2.o \
  130. cancel3.o \
  131. cancel4.o \
  132. cancel5.o \
  133. cancel6a.o \
  134. cancel6d.o \
  135. cleanup0.o \
  136. cleanup1.o \
  137. cleanup2.o \
  138. cleanup3.o
  139. BENCH_TEST_OBJS = \
  140. benchlib.o \
  141. benchtest1.o \
  142. benchtest2.o \
  143. benchtest3.o \
  144. benchtest4.o
  145. EXCEPTION_TEST_OBJS = \
  146. exception1.o \
  147. exception2.o \
  148. exception3.o
  149. OBJS = $(MUTEX_TEST_OBJS) $(MISC_OBJS) $(MISC_TEST_OBJS) $(THREAD_TEST_OBJS) $(SEM_TEST_OBJS) $(BARRIER_TEST_OBJS) $(SPIN_TEST_OBJS) $(CONDVAR_TEST_OBJS) $(RWLOCK_TEST_OBJS) $(CANCEL_TEST_OBJS) $(BENCH_TEST_OBJS) $(EXCEPTION_TEST_OBJS)
  150. INCDIR =
  151. CFLAGS = $(GLOBAL_CFLAGS) -O2 -Wall -g -I.. -fno-strict-aliasing -I../.. -G0
  152. CXXFLAGS = $(CFLAGS) -fexceptions -fno-rtti
  153. ASFLAGS = $(CFLAGS)
  154. LDFLAGS = -L../..
  155. LIBS = -lc -lpthread-psp -lstdc++
  156. ifeq ($(CLEANUP_TYPE),CPPXX)
  157. LIBS += -lstdc++
  158. endif
  159. PSPSDK=$(shell psp-config --pspsdk-path)
  160. include $(PSPSDK)/lib/build.mak
  161. ifeq ($(CLEANUP_TYPE),CPPXXX)
  162. CC=psp-g++
  163. exception1.o: exception1.c
  164. $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) $(TARGET_ARCH) \
  165. -c ../../tests/exception1.c -o exception1.o
  166. exception2.o: exception2.c
  167. $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) $(TARGET_ARCH) \
  168. -c ../../tests/exception2.c -o exception2.o
  169. exception3.o: exception3.c
  170. $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) $(TARGET_ARCH) \
  171. -c ../../tests/exception3.c -o exception3.o
  172. endif
  173. install: $(TARGET_LIB)
  174. @cp -v $(TARGET_LIB) `psp-config --psp-prefix`/lib
  175. @cp -v *.h `psp-config --psp-prefix`/include
  176. @echo "Done."