-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (43 loc) · 1.48 KB
/
Makefile
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
#
# Makefile for librtas
#
include rules.mk
.SILENT:
FILES = README COPYRIGHT
SUBDIRS = librtas_src librtasevent_src libofdt_src
TARBALL_FILES += $(FILES) doc/doxygen.rtas doc/doxygen.rtasevent Changelog
all:
@$(foreach d,$(SUBDIRS), $(MAKE) -C $d;)
# Update spec file for build type
@sed "s|\@LIB_DIR\@|$(LIB_DIR)$(call is_lib64,librtas_src/librtas.so.$(VERSION))|g" $(SPECFILE_IN) > $(SPECFILE)
install:
@$(call install_doc,$(FILES),$(DESTDIR))
@$(foreach d,$(SUBDIRS), $(MAKE) -C $d install;)
uninstall:
@$(call uninstall_doc,$(FILES),$(DESTDIR))
@$(foreach d,$(SUBDIRS), $(MAKE) -C $d uninstall;)
rpm: all
@echo "Creating rpm..."
@export DESTDIR=$(SHIPDIR); $(MAKE) install
@rm $(SHIPDIR)$(LIB_DIR)$(call is_lib64,librtas_src/librtas.so.$(VERSION))/librtas.so
@rm $(SHIPDIR)$(LIB_DIR)$(call is_lib64,librtasevent_src/librtasevent.so.$(VERSION))/librtasevent.so
@rm $(SHIPDIR)$(LIB_DIR)$(call is_lib64,libofdt_src/libofdt.so.$(VERSION))/libofdt.so
@$(RPM) -bb $(SPECFILE)
@rm -rf $(SHIPDIR)
docs:
@echo "Creating doxygen documents..."
@mkdir -p doc/librtasevent
@mkdir -p doc/librtas
@$(DOXYGEN) doc/doxygen.rtas
@$(DOXYGEN) doc/doxygen.rtasevent
tarball: clean
@echo "Creating release tarball..."
@$(BUILD_TARBALL)
devball: clean
@echo "Creating snapshot tarball..."
@$(BUILD_DEVBALL)
clean:
@$(foreach d,$(SUBDIRS), $(MAKE) -C $d clean;)
@echo "Cleaning up doxygen files..."
@rm -rf doc/librtas doc/librtasevent
@$(CLEAN) $(SHIPDIR) $(TARBALL) $(DEVBALL) $(SPECFILE)