|
1 | 1 | # Copyright (c) 2019, Intel Corporation |
2 | | -# |
| 2 | +# |
3 | 3 | # Redistribution and use in source and binary forms, with or without |
4 | 4 | # modification, are permitted provided that the following conditions |
5 | 5 | # are met: |
6 | | -# |
| 6 | +# |
7 | 7 | # * Redistributions of source code must retain the above copyright |
8 | 8 | # notice, this list of conditions and the following disclaimer. |
9 | | -# |
| 9 | +# |
10 | 10 | # * Redistributions in binary form must reproduce the above copyright |
11 | 11 | # notice, this list of conditions and the following disclaimer in |
12 | 12 | # the documentation and/or other materials provided with the |
13 | 13 | # distribution. |
14 | | -# |
| 14 | +# |
15 | 15 | # * Neither the name of Intel Corporation nor the names of its |
16 | 16 | # contributors may be used to endorse or promote products derived |
17 | 17 | # from this software without specific prior written permission. |
18 | | -# |
| 18 | +# |
19 | 19 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
20 | 20 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
21 | 21 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
|
32 | 32 | # Makefile for chapter3 examples |
33 | 33 | # |
34 | 34 |
|
35 | | -all: mmap_example |
| 35 | +.SUFFIXES: .lst |
| 36 | + |
| 37 | +all: mmap_example pmem_map_file listings |
| 38 | + |
| 39 | +listings: mmap_example.lst pmem_map_file.lst map_file_windows_example.lst |
| 40 | + |
| 41 | +.c.lst: |
| 42 | + cat -n $^ > $@ |
36 | 43 |
|
37 | 44 | mmap_example: mmap_example.c |
38 | | - $(CC) -o $@ $^ |
| 45 | + $(CC) -o mmap_example mmap_example.c |
| 46 | + |
| 47 | +pmem_map_file: pmem_map_file.c |
| 48 | + $(CC) -o pmem_map_file pmem_map_file.c -lpmem |
39 | 49 |
|
40 | 50 | clean: |
41 | 51 | $(RM) *.o core a.out testfile |
42 | 52 |
|
43 | 53 | clobber: clean |
44 | | - $(RM) mmap_example |
| 54 | + $(RM) mmap_example pmem_map_file *.lst |
45 | 55 |
|
46 | 56 | .PHONY: all clean clobber |
0 commit comments