summaryrefslogtreecommitdiffstats
path: root/c/src/libfs/src/imfs/Makefile.am
blob: 6172d25a7b62b73587293304998e2020ea376068 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
##
##  $Id$
##

AUTOMAKE_OPTIONS = foreign 1.4

INCLUDES = -I.

LIBNAME = libimfs
LIB = ${ARCH}/${LIBNAME}.a

IMFS_C_FILES = imfs_chown.c imfs_config.c imfs_creat.c imfs_directory.c \
    imfs_eval.c imfs_free.c imfs_fsunmount.c imfs_gtkn.c imfs_init.c \
    imfs_initsupp.c imfs_link.c imfs_mknod.c imfs_mount.c imfs_fchmod.c \
    imfs_unlink.c imfs_unmount.c imfs_utime.c imfs_ntype.c imfs_stat.c \
    imfs_getchild.c memfile.c linearfile.c deviceio.c imfs_handlers_device.c \
    imfs_handlers_directory.c imfs_handlers_link.c imfs_handlers_memfile.c \
    imfs_debug.c imfs_rmnod.c imfs_symlink.c imfs_readlink.c imfs_fdatasync.c \
    imfs_fcntl.c ioman.c miniimfs_init.c imfs_load_tar.c

UNIX_C_FILES = imfs_unixstub.c

EMBEDDED_C_FILES = $(IMFS_C_FILES)

COMMON_C_FILES =

if UNIX
C_FILES = $(COMMON_C_FILES) $(UNIX_C_FILES)
else
C_FILES = $(COMMON_C_FILES) $(EMBEDDED_C_FILES)
endif
C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)

include_HEADERS = imfs.h
SYS_H_FILES =
RTEMS_H_FILES = 
noinst_HEADERS =

include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../automake/compile.am
include $(top_srcdir)/../../../automake/lib.am

PREINSTALL_FILES += $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/rtems \
    $(PROJECT_INCLUDE)/sys $(include_HEADERS:%=$(PROJECT_INCLUDE)/%) \
    $(RTEMS_H_FILES:%=$(PROJECT_INCLUDE)/rtems/%) \
    $(SYS_H_FILES:%=$(PROJECT_INCLUDE)/sys/%)

$(PROJECT_INCLUDE):
	@$(mkinstalldirs) $@
$(PROJECT_INCLUDE)/rtems:
	@$(mkinstalldirs) $@
$(PROJECT_INCLUDE)/sys:
	@$(mkinstalldirs) $@

$(PROJECT_INCLUDE)/%.h: %.h
	$(INSTALL_DATA) $< $@
$(PROJECT_INCLUDE)/rtems/%.h: %.h
	$(INSTALL_DATA) $< $@
$(PROJECT_INCLUDE)/sys/%.h: %.h
	$(INSTALL_DATA) $< $@

OBJS = $(C_O_FILES)

#
# Add local stuff here using +=
#

AM_CFLAGS += $(LIBC_DEFINES) 

all-local: ${ARCH} $(LIB)

$(LIB): ${OBJS}
	$(make-library)

DOC_FILES = TODO CASES

EXTRA_DIST = $(DOC_FILES) $(COMMON_C_FILES) $(EMBEDDED_C_FILES) \
    $(UNIX_C_FILES) $(RTEMS_H_FILES) $(SYS_H_FILES)

include $(top_srcdir)/../../../automake/local.am