home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / emx / test / makefile < prev    next >
Encoding:
Makefile  |  1993-01-03  |  13.7 KB  |  440 lines

  1. #
  2. # /emx/test/makefile
  3. #
  4. CFLAGS=-g -Wall
  5. CC=gcc $(CFLAGS)
  6. B=/emx/bin/
  7. I=/emx/include/
  8. P=/emx/include.cpp/
  9. L=/emx/lib/
  10. SIGNAL=$(I)signal.h $(I)sys/signal.h
  11. FCNTL=$(I)fcntl.h $(I)sys/fcntl.h
  12. LIBS=$(L)crt0.o $(L)libc.a $(L)libgcc.a
  13. LIBP=$(L)libgpp.a
  14. LIBOS2=$(L)libos2.a
  15. LIBBSD=$(L)libbsd.a
  16.  
  17. .SUFFIXES: .o .c .cc .s .exe
  18.  
  19. .c.o:
  20.     $(CC) -c $<
  21.  
  22. .cc.o:
  23.     $(CC) -c $<
  24.  
  25. .c.s:
  26.     $(CC) -S $<
  27.  
  28. .o.exe:
  29.     $(CC) -o $*.exe $<
  30.  
  31. default:        samples
  32.  
  33. all:            samples tests plusplus os2only dosonly
  34.  
  35. samples:        calc.exe graph.exe eatool.exe sieve.exe sort.exe \
  36.                 wm_demo.exe wm_hello.exe
  37.  
  38. tests:          access.exe alarm.exe args.exe bsdtest.exe conv.exe \
  39.                 coretest.exe coretst2.exe ctypetst.exe debug.exe divtest.exe \
  40.                 dttest.exe exec.exe explode.exe float.exe ftwtest.exe \
  41.                 fullpath.exe hexdump.exe hw_io.exe longlong.exe math.exe \
  42.                 memory.exe memtest.exe nls.exe pack.exe pid.exe printf.exe \
  43.                 retcode.exe sbrktest.exe scanf.exe sig1.exe sig2.exe sig3.exe \
  44.                 splitarg.exe stack.exe stdiotst.exe system.exe swaptest.exe \
  45.                 termio.exe timetest.exe tmpnam.exe trunc.exe uname.exe \
  46.                 version.exe video.exe wm_test.exe
  47.  
  48. dosonly:        hw_mem.exe vmode.exe
  49.  
  50. os2only:        dlltest1 far16.exe fork.exe idle.exe kbd.exe msgtest \
  51.                 os2test.exe pm1.exe pipe.exe popen.exe read_kbd.exe \
  52.                 select.exe showmem.exe testdll1.dll threads.exe thunk.exe \
  53.                 vio.exe
  54.  
  55. dlltest1:       dlltest1.exe testdll1.dll
  56.  
  57. plusplus:       hello.exe stdio1.exe stdio2.exe test1.exe test2.exe
  58.  
  59. objc:           objcsamp.exe
  60.  
  61. msgtest:        msgtest.exe msgtest.msg
  62.  
  63. clean:
  64.     -del *.o $(DELOPT)
  65.     -del *.exe $(DELOPT)
  66.     -del *.dll $(DELOPT)
  67.     -del *.obj $(DELOPT)
  68.     -del coretest $(DELOPT)
  69.     -del coretest.cor $(DELOPT)
  70.     -del mathtest.out $(DELOPT)
  71.     -del pm1 $(DELOPT)
  72.     -del pm1.res $(DELOPT)
  73.  
  74. access.o:       access.c $(I)stdio.h $(I)io.h $(I)string.h $(I)stdlib.h
  75. alarm.o:        alarm.c $(I)stdio.h $(I)stdlib.h $(I)string.h $(SIGNAL)
  76. args.o:         args.c $(I)stdio.h $(I)stdlib.h
  77. bsdtest.o:      bsdtest.c $(I)stdio.h $(I)stdlib.h
  78. calc.o:         calc.c $(I)stdio.h $(I)stdlib.h $(I)string.h $(I)math.h \
  79.                 $(I)ctype.h $(I)setjmp.h
  80. conv.o:         conv.c $(I)stdio.h $(I)stdlib.h $(I)string.h
  81. coretest.o:     coretest.c $(I)stdio.h $(I)stdlib.h $(I)io.h $(FCNTL) \
  82.                 $(I)sys/types.h $(I)sys/stat.h
  83. ctypetst.o:     ctypetst.c $(I)stdio.h $(I)string.h $(I)ctype.h
  84. debug.o:        debug.c $(I)stdio.h $(I)string.h $(I)process.h \
  85.                 $(I)sys/ptrace.h $(I)sys/reg.h $(I)sys/user.h $(I)stdlib.h
  86. divtest.o:      divtest.c $(I)stdio.h $(I)stdlib.h
  87. dttest.o:       dttest.c $(I)stdio.h $(I)stdlib.h $(I)getopt.h $(I)time.h \
  88.                 $(I)sys/dirtree.h $(I)sys/param.h
  89. exec.o:         exec.c $(I)stdio.h $(I)string.h $(I)process.h $(SIGNAL)
  90. explode.o:      explode.c $(I)stdio.h $(I)stdlib.h
  91. far16.o:        far16.c $(I)stdio.h $(I)os2.h $(I)os2thunk.h
  92. float.o:        float.c $(I)stdio.h $(I)float.h
  93. fork.o:         fork.c $(I)process.h $(I)stdio.h $(I)string.h $(I)stdlib.h \
  94.                 $(I)getopt.h $(SIGNAL) $(I)time.h
  95. ftwtest.o:      ftwtest.c $(I)stdio.h $(I)sys/types.h $(I)sys/stat.h \
  96.                 $(I)ftw.h
  97. fullpath.o:     fullpath.c $(I)stdio.h $(I)stdlib.h $(I)sys/param.h \
  98.                 $(I)getopt.h
  99. graph.o:        graph.c $(I)graph.h $(I)conio.h $(I)stdlib.h $(I)stdio.h \
  100.                 $(I)getopt.h $(I)signal.h $(I)setjmp.h $(I)limits.h \
  101.                 $(I)string.h
  102. hello.o:        hello.cc $(P)iostream.h
  103. hexdump.o:      hexdump.c $(I)stdio.h $(I)stdlib.h $(I)io.h $(FCNTL) \
  104.                 $(I)sys/ioctl.h
  105. hw_io.o:        hw_io.c $(I)stdio.h $(I)stdlib.h $(I)sys/hw.h $(I)string.h
  106. hw_mem.o:       hw_mem.c $(I)stdio.h $(I)stdlib.h $(I)sys/hw.h $(I)memory.h \
  107.                 $(I)io.h
  108. idle.o:         idle.c $(I)stdio.h $(I)process.h $(I)string.h $(I)os2emx.h \
  109.                 $(I)stdlib.h
  110. eatool.o:       eatool.c $(I)stdio.h $(I)stdlib.h $(I)string.h $(I)sys/ead.h \
  111.                 $(I)getopt.h $(I)sys/nls.h $(I)os2.h
  112. math.o:         math.c $(I)stdio.h $(I)stdlib.h $(I)math.h
  113. memory.o:       memory.c $(I)stdio.h $(I)string.h
  114. memtest.o:      memtest.c $(I)sys/emx.h $(I)stdio.h $(I)stdlib.h \
  115.                 $(I)string.h $(I)io.h
  116. nls.o:          nls.c $(I)sys/nls.h $(I)stdio.h $(I)string.h $(I)stdlib.h
  117. os2test.o:      os2test.c $(I)stdio.h $(I)string.h $(I)os2emx.h
  118. pack.o:         pack.c $(I)stdio.h
  119. pid.o:          pid.c $(I)stdio.h $(I)process.h
  120. pipe.o:         pipe.c $(I)stdio.h $(I)io.h $(I)process.h $(I)unistd.h \
  121.                 $(I)stdlib.h $(FCNTL) $(I)string.h $(SIGNAL)
  122. pm1.o:          pm1.c pm1.h $(I)stdio.h $(I)os2emx.h
  123. popen.o:        popen.c $(I)stdio.h $(I)stdlib.h $(I)string.h $(I)getopt.h
  124. printf.o:       printf.c $(I)stdio.h
  125. retcode.o:      retcode.c $(I)stdlib.h
  126. sbrktest.o:     sbrktest.c $(I)stdio.h $(I)stdlib.h $(I)string.h
  127. scanf.o:        scanf.c $(I)stdio.h
  128. select.o:       select.c $(I)stdio.h $(I)io.h $(I)process.h $(I)unistd.h \
  129.                 $(I)stdlib.h $(FCNTL) $(I)string.h $(SIGNAL) $(I)sys/ioctl.h \
  130.                 $(I)sys/types.h $(I)sys/time.h
  131. showmem.o:      showmem.c $(I)stdio.h $(I)stdlib.h $(I)string.h $(I)os2emx.h
  132. sieve.o:        sieve.c $(I)stdio.h $(I)stdlib.h $(I)memory.h
  133. sig1.o:         sig1.c $(I)stdio.h $(SIGNAL)
  134. sig2.o:         sig1.c $(I)stdio.h $(I)stdlib.h $(SIGNAL) $(I)setjmp.h \
  135.                 $(I)process.h
  136. sig3.o:         sig3.c $(I)stdio.h $(I)stdlib.h $(SIGNAL) $(I)setjmp.h
  137. sort.o:         sort.c $(I)stdio.h $(I)stdlib.h $(I)string.h
  138. splitarg.o:     splitarg.c $(I)stdio.h $(I)stdlib.h $(I)string.h
  139. stack.o:        stack.c $(I)stdio.h $(I)stdlib.h $(I)string.h $(SIGNAL) \
  140.                 $(I)alloca.h
  141. stdio.o:        stdio.cc $(I)stdio.h $(P)iostream.h
  142. stdiotst.o:     stdiotst.c $(I)stdio.h $(I)stdlib.h
  143. system.o:       system.c $(I)stdio.h $(I)stdlib.h $(I)string.h $(I)process.h
  144. swaptest.o:     swaptest.c $(I)stdio.h $(I)stdlib.h $(I)io.h
  145. termio.o:       termio.c $(I)stdio.h $(I)stdlib.h $(I)string.h $(I)io.h \
  146.                 $(I)errno.h $(SIGNAL) $(I)process.h $(I)setjmp.h \
  147.                 $(I)sys/types.h $(I)sys/time.h $(I)sys/termio.h $(I)fcntl.h \
  148.                 $(I)sys/ioctl.h
  149. test1.o:        test1.cc $(I)stdio.h $(P)iostream.h
  150. test2.o:        test2.cc $(P)iostream.h
  151. dlltest1.o:     dlltest1.c
  152. timetest.o:     timetest.c $(I)stdio.h $(I)time.h $(I)sys/types.h \
  153.                 $(I)sys/stat.h $(I)io.h $(I)stdlib.h $(I)ctype.h $(I)string.h \
  154.                 $(I)getopt.h
  155. tmpnam.o:       tmpnam.c $(I)stdio.h
  156. trunc.o:        trunc.c $(I)stdio.h $(I)stdlib.h $(I)io.h $(I)getopt.h \
  157.                 $(I)fcntl.h
  158. uname.o:        uname.c $(I)stdio.h $(I)sys/utsname.h
  159. version.o:      version.c $(I)stdio.h $(I)stdlib.h $(I)string.h $(I)sys/emx.h
  160. video.o:        video.c $(I)stdio.h $(I)stdlib.h $(I)sys/video.h
  161. vmode.o:        vmode.c $(I)stdio.h $(I)stdlib.h $(I)dos.h
  162. wm_demo.o:      wm_demo.c $(I)stdio.h $(I)stdlib.h $(I)string.h \
  163.                 $(I)sys/winmgr.h
  164. wm_hello.o:     wm_hello.c $(I)stdio.h $(I)stdlib.h $(I)sys/winmgr.h
  165. wm_test.o:      wm_test.c $(I)stdio.h $(I)stdlib.h $(I)string.h \
  166.                 $(I)sys/video.h $(I)sys/winmgr.h $(I)sys/kbdscan.h
  167.  
  168. longlong.o:     longlong.c $(I)stdio.h $(I)stdlib.h
  169.     @echo 2 warnings expected
  170.     $(CC) -c longlong.c
  171.  
  172. imp1.o:         testdll1.imp
  173.     emximp -a testdll1.imp
  174.  
  175. msgtest.obj:    msgtest.c
  176.     gcc -c msgtest.c -Zomf
  177.  
  178. #
  179. # mkmsgf comes with the "IBM Developer's Toolkit for OS/2 2.0"
  180. #
  181. msgtest.msg:    msgtest.txt
  182.     mkmsgf msgtest.txt msgtest.msg
  183.  
  184. testdll1.o: testdll1.c
  185.     $(CC) -Zdll -c testdll1.c
  186.  
  187. testdll1.dll: testdll1.o testdll1.def $(LIBS) $(LIBOS2)
  188.     $(CC) -Zdll -o testdll1.dll testdll1.o -s
  189.  
  190. access.exe:     access.o $(LIBS)
  191.     $(CC) -o access.exe access.o
  192.  
  193. alarm.exe:      alarm.o $(LIBS)
  194.     $(CC) -o alarm.exe alarm.o
  195.  
  196. args.exe:       args.o $(LIBS)
  197.     $(CC) -o args.exe args.o
  198.  
  199. bsdtest.exe:    bsdtest.o $(LIBS) $(LIBBSD)
  200.     $(CC) -o bsdtest.exe bsdtest.o -lbsd
  201.  
  202. calc.exe:       calc.o $(LIBS)
  203.     $(CC) -o calc.exe calc.o
  204.  
  205. conv.exe:       conv.o $(LIBS)
  206.     $(CC) -o conv.exe conv.o
  207.  
  208. coretest:       coretest.o $(LIBS)
  209.     $(CC) -o coretest coretest.o
  210.  
  211. coretest.exe:   coretest
  212.     emxbind $(B)emxl coretest
  213.  
  214. coretest.cor:   coretest.exe
  215.     coretest
  216.  
  217. coretst2.exe:   coretest coretest.cor
  218.     emxbind -ccoretest.cor $(B)emxl coretest coretst2
  219.  
  220. ctypetst.exe:   ctypetst.o $(LIBS)
  221.     $(CC) -o ctypetst.exe ctypetst.o
  222.  
  223. debug.exe:      debug.o $(LIBS)
  224.     $(CC) -o debug.exe debug.o
  225.  
  226. divtest.exe:    divtest.o $(LIBS)
  227.     $(CC) -o divtest.exe divtest.o
  228.  
  229. dttest.exe:     dttest.o $(LIBS)
  230.     $(CC) -o dttest.exe dttest.o
  231.  
  232. exec.exe:       exec.o $(LIBS)
  233.     $(CC) -o exec.exe exec.o
  234.     emxbind -aq exec -p
  235.  
  236. explode.exe:    explode.o $(LIBS)
  237.     $(CC) -o explode.exe explode.o
  238.  
  239. far16.exe:      far16.o $(LIBS) $(LIBOS2)
  240.     $(CC) -o far16.exe far16.o
  241.  
  242. float.exe:      float.o $(LIBS)
  243.     $(CC) -o float.exe float.o
  244.  
  245. fork.exe:       fork.o $(LIBS)
  246.     $(CC) -o fork.exe fork.o
  247.  
  248. ftwtest.exe:    ftwtest.o $(LIBS)
  249.     $(CC) -o ftwtest.exe ftwtest.o
  250.  
  251. fullpath.exe:   fullpath.o $(LIBS)
  252.     $(CC) -o fullpath.exe fullpath.o
  253.  
  254. graph.exe:      graph.o graph.def $(LIBS) $(LIBOS2) $(L)libgraph.a
  255.     $(CC) -o graph.exe graph.o graph.def -lgraph
  256.     emxbind -aq graph -acim
  257.  
  258. hello.exe:      hello.o $(LIBS) $(LIBP)
  259.     $(CC) -o hello.exe hello.o -lgpp
  260.  
  261. hexdump.exe:    hexdump.o $(LIBS)
  262.     $(CC) -o hexdump.exe hexdump.o
  263.  
  264. hw_io.exe:      hw_io.o $(LIBS)
  265.     $(CC) -o hw_io.exe hw_io.o
  266.     emxbind -aq hw_io -ai
  267.  
  268. hw_mem.exe:     hw_mem.o $(LIBS)
  269.     $(CC) -o hw_mem.exe hw_mem.o
  270.     emxbind -aq hw_mem -am -p
  271.  
  272. idle.exe:       idle.o $(LIBS) $(LIBOS2)
  273.     $(CC) -o idle.exe idle.o
  274.  
  275. kbd.exe:        kbd.c $(LIBS) $(LIBOS2)
  276.     $(CC) -o kbd.exe kbd.c -Zomf -Zsys -T 0x10000
  277.  
  278. eatool.exe:     eatool.o $(LIBS) $(LIBOS2)
  279.     $(CC) -o eatool.exe eatool.o
  280.  
  281. longlong.exe:   longlong.o $(LIBS)
  282.     $(CC) -o longlong.exe longlong.o
  283.  
  284. math.exe:       math.o $(LIBS)
  285.     $(CC) -o math.exe math.o
  286.  
  287. memory.exe:     memory.o $(LIBS)
  288.     $(CC) -o memory.exe memory.o
  289.  
  290. memtest.exe:    memtest.o $(LIBS)
  291.     $(CC) -o memtest.exe memtest.o
  292.  
  293. msgtest.exe:    msgtest.obj
  294.     $(CC) -o msgtest.exe msgtest.obj -Zomf
  295.  
  296. nls.exe:        nls.o $(LIBS)
  297.     $(CC) -o nls.exe nls.o
  298.  
  299. objcsamp.exe:   objcsamp.m $(I)stdio.h $(I)objc/Object.h $(LIBS) $(L)libobjc.a
  300.     $(CC) -o objcsamp.exe objcsamp.m -lobjc
  301.  
  302. os2test.exe:    os2test.o $(LIBS) $(LIBOS2)
  303.     $(CC) -o os2test.exe os2test.o
  304.  
  305. pack.exe:       pack.o $(LIBS)
  306.     $(CC) -o pack.exe pack.o
  307.  
  308. pid.exe:        pid.o $(LIBS)
  309.     $(CC) -o pid.exe pid.o
  310.  
  311. pipe.exe:       pipe.o $(LIBS)
  312.     $(CC) -o pipe.exe pipe.o
  313.  
  314. pm1.res:        pm1.rc pm1.h
  315.     rc -r -i \emx\include pm1.rc
  316.  
  317. pm1:            pm1.o $(LIBS) $(LIBOS2)
  318.     $(CC) -o pm1 pm1.o
  319.  
  320. pm1.exe:        pm1 pm1.res
  321.     emxbind -bpq -rpm1.res /emx/bin/emxl pm1
  322.  
  323. popen.exe:      popen.o $(LIBS)
  324.     $(CC) -o popen.exe popen.o
  325.  
  326. printf.exe:     printf.o $(LIBS)
  327.     $(CC) -o printf.exe printf.o
  328.  
  329. read_kbd.exe:   read_kbd.c
  330.     $(CC) -O -o read_kbd.exe read_kbd.c -Zomf -Zsys -T 0x10000
  331.  
  332. retcode.exe:    retcode.o $(LIBS)
  333.     $(CC) -o retcode.exe retcode.o
  334.  
  335. sbrktest.exe:   sbrktest.o $(LIBS)
  336.     $(CC) -o sbrktest.exe sbrktest.o
  337.  
  338. scanf.exe:      scanf.o $(LIBS)
  339.     $(CC) -o scanf.exe scanf.o
  340.  
  341. select.exe:     select.o $(LIBS)
  342.     $(CC) -o select.exe select.o
  343.  
  344. showmem.exe:    showmem.o $(LIBS) $(LIBOS2)
  345.     $(CC) -o showmem.exe showmem.o
  346.  
  347. sieve.exe:      sieve.o $(LIBS)
  348.     $(CC) -o sieve.exe sieve.o
  349.  
  350. sig1.exe:       sig1.o $(LIBS)
  351.     $(CC) -o sig1.exe sig1.o
  352.  
  353. sig2.exe:       sig2.o $(LIBS)
  354.     $(CC) -o sig2.exe sig2.o
  355.  
  356. sig3.exe:       sig3.o $(LIBS)
  357.     $(CC) -o sig3.exe sig3.o
  358.  
  359. sort.exe:       sort.o $(LIBS)
  360.     $(CC) -o sort.exe sort.o
  361.  
  362. splitarg.exe:   splitarg.o $(LIBS)
  363.     $(CC) -o splitarg.exe splitarg.o
  364.  
  365. stack.exe:      stack.o $(LIBS)
  366.     $(CC) -o stack.exe stack.o
  367.  
  368. stdio1.exe:     stdio.o $(LIBS) $(LIBP)
  369.     $(CC) -o stdio1.exe stdio.o -lgpp
  370.  
  371. stdio2.exe:     stdio.o $(LIBS) $(LIBP)
  372.     $(CC) -o stdio2.exe stdio.o -lstdio -lgpp
  373.  
  374. stdiotst.exe:   stdiotst.o $(LIBS)
  375.     $(CC) -o stdiotst.exe stdiotst.o
  376.  
  377. system.exe:     system.o $(LIBS)
  378.     $(CC) -o system.exe system.o
  379.     emxbind -aq system -p
  380.  
  381. swaptest.exe:   swaptest.o $(LIBS)
  382.     $(CC) -o swaptest.exe swaptest.o
  383.  
  384. termio.exe:     termio.o $(LIBS)
  385.     $(CC) -o termio.exe termio.o
  386.  
  387. test1.exe:      test1.o $(LIBS) $(LIBP)
  388.     $(CC) -o test1.exe test1.o -lgpp
  389.  
  390. test2.exe:      test2.o $(LIBS) $(LIBP)
  391.     $(CC) -o test2.exe test2.o -lgpp
  392.  
  393. dlltest1.exe:   dlltest1.o imp1.o
  394.     $(CC) -o dlltest1.exe dlltest1.o imp1.o
  395.  
  396. threads.exe:    threads.c $(I)stdio.h $(I)stdlib.h $(I)string.h \
  397.                 $(I)ctype.h $(I)getopt.h $(I)os2emx.h
  398.     $(CC) -o threads.exe threads.c -Zomf -Zmt -T 0x10000
  399.  
  400. thunk.exe:      thunk.c $(I)os2thunk.h
  401.     $(CC) -o thunk.exe thunk.c
  402.  
  403. timetest.exe:   timetest.o $(LIBS)
  404.     $(CC) -o timetest.exe timetest.o
  405.  
  406. tmpnam.exe:     tmpnam.o $(LIBS)
  407.     $(CC) -o tmpnam.exe tmpnam.o
  408.  
  409. trunc.exe:      trunc.o $(LIBS)
  410.     $(CC) -o trunc.exe trunc.o
  411.  
  412. uname.exe:      uname.o $(LIBS)
  413.     $(CC) -o uname.exe uname.o
  414.  
  415. version.exe:    version.o $(LIBS)
  416.     $(CC) -o version.exe version.o
  417.  
  418. video.exe:      video.o $(LIBS) $(L)libvideo.a
  419.     $(CC) -o video.exe video.o -lvideo
  420.     emxbind -aq video -acm
  421.  
  422. vio.exe:        vio.c
  423.     $(CC) -O -o vio.exe vio.c -Zomf -Zmt -T 0x10000
  424.  
  425. vmode.exe:      vmode.o $(LIBS)
  426.     $(CC) -o vmode.exe vmode.o
  427.     emxbind -aq vmode -ac
  428.  
  429. wm_demo.exe:    wm_demo.o $(LIBS) $(L)libvideo.a
  430.     $(CC) -o wm_demo.exe wm_demo.o -lvideo
  431.     emxbind -aq wm_demo -acm
  432.  
  433. wm_hello.exe:   wm_hello.o $(LIBS) $(L)libvideo.a
  434.     $(CC) -o wm_hello.exe wm_hello.o -lvideo
  435.     emxbind -aq wm_hello -acm
  436.  
  437. wm_test.exe:    wm_test.o $(LIBS) $(L)libvideo.a
  438.     $(CC) -o wm_test.exe wm_test.o -lvideo
  439.     emxbind -aq wm_test -acm
  440.