1 | if TARTESTS |
---|
2 | rtems_tests_PROGRAMS = tar01 |
---|
3 | tar01_SOURCES = |
---|
4 | tar01_SOURCES += init.c |
---|
5 | tar01_SOURCES += ../../psxtests/psxfile01/test_cat.c |
---|
6 | tar01_SOURCES += initial_filesystem_tar.c |
---|
7 | tar01_SOURCES += initial_filesystem_tar.h |
---|
8 | tar01_SOURCES += initial_filesystem_tar_gz.c |
---|
9 | tar01_SOURCES += initial_filesystem_tar_gz.h |
---|
10 | |
---|
11 | tar01_LDADD = -lrtemscpu -lz |
---|
12 | |
---|
13 | BUILT_SOURCES = |
---|
14 | BUILT_SOURCES += initial_filesystem_tar.c |
---|
15 | BUILT_SOURCES += initial_filesystem_tar.h |
---|
16 | BUILT_SOURCES += initial_filesystem_tar_gz.c |
---|
17 | BUILT_SOURCES += initial_filesystem_tar_gz.h |
---|
18 | |
---|
19 | dist_rtems_tests_DATA = tar01.scn |
---|
20 | dist_rtems_tests_DATA += tar01.doc |
---|
21 | endif TARTESTS |
---|
22 | |
---|
23 | include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg |
---|
24 | include $(top_srcdir)/../automake/compile.am |
---|
25 | include $(top_srcdir)/../automake/leaf.am |
---|
26 | |
---|
27 | if TARTESTS |
---|
28 | AM_CPPFLAGS += -I$(top_srcdir)/include |
---|
29 | AM_CPPFLAGS += -I$(top_srcdir)/../support/include |
---|
30 | AM_CPPFLAGS += -I$(top_srcdir)/../psxtests/include |
---|
31 | |
---|
32 | LINK_OBJS = $(tar01_OBJECTS) $(tar01_LDADD) |
---|
33 | LINK_LIBS = $(tar01_LDLIBS) |
---|
34 | |
---|
35 | tar01$(EXEEXT): $(tar01_OBJECTS) $(tar01_DEPENDENCIES) |
---|
36 | @rm -f tar01$(EXEEXT) |
---|
37 | $(make-exe) |
---|
38 | |
---|
39 | initial_filesystem_tar.c: initial_filesystem.tar |
---|
40 | $(BIN2C) -C initial_filesystem.tar initial_filesystem_tar |
---|
41 | CLEANFILES += initial_filesystem_tar.c |
---|
42 | |
---|
43 | initial_filesystem_tar.h: initial_filesystem.tar |
---|
44 | $(BIN2C) -H initial_filesystem.tar initial_filesystem_tar |
---|
45 | CLEANFILES += initial_filesystem_tar.h |
---|
46 | |
---|
47 | initial_filesystem_tar_gz.c: initial_filesystem.tar.gz |
---|
48 | $(BIN2C) -C initial_filesystem.tar.gz initial_filesystem_tar_gz |
---|
49 | CLEANFILES += initial_filesystem_tar_gz.h |
---|
50 | |
---|
51 | initial_filesystem_tar_gz.h: initial_filesystem.tar.gz |
---|
52 | $(BIN2C) -H initial_filesystem.tar.gz initial_filesystem_tar_gz |
---|
53 | CLEANFILES += initial_filesystem_tar_gz.h |
---|
54 | |
---|
55 | initial_filesystem.tar: |
---|
56 | rm -rf initial_fs |
---|
57 | $(MKDIR_P) initial_fs/home |
---|
58 | (echo "This is a test of loading an RTEMS filesystem from an" ; \ |
---|
59 | echo "initial tar image.") >initial_fs/home/test_file |
---|
60 | (cd initial_fs; \ |
---|
61 | $(LN_S) home/test_file symlink; \ |
---|
62 | $(PAX) -w -f ../initial_filesystem.tar home symlink) |
---|
63 | CLEANFILES += initial_filesystem.tar |
---|
64 | |
---|
65 | initial_filesystem.tar.gz: initial_filesystem.tar |
---|
66 | $(GZIP) < initial_filesystem.tar > initial_filesystem.tar.gz |
---|
67 | CLEANFILES += initial_filesystem.tar.gz |
---|
68 | |
---|
69 | endif TARTESTS |
---|
70 | |
---|
71 | clean-local: |
---|
72 | -rm -rf initial_fs |
---|
73 | |
---|
74 | include $(top_srcdir)/../automake/local.am |
---|