-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (19 loc) · 680 Bytes
/
Makefile
File metadata and controls
34 lines (19 loc) · 680 Bytes
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
SUB_DIRS:=kernelspace userspace scripts statistics tools
CLEAN_DIRS = $(SUB_DIRS:%=clean-%)
.PHONY: build_subdirs $(SUB_DIRS) $(CLEAN_DIRS)
all: build_subdirs
build_subdirs: $(SUB_DIRS)
$(SUB_DIRS):
cd $@; $(MAKE); cd ..
clean: $(CLEAN_DIRS)
$(CLEAN_DIRS):
cd $(@:clean-%=%); $(MAKE) clean; cd ..
dist: clean
rm -rf `cat .fname` .fname
$(eval AUX_FILES := $(shell find . -maxdepth 1 -type f))
sed -e 's/\s//' -e 's/\(.*\)/timer-netsend-test_\1/' VERSION >.fname
mkdir `cat .fname`
$(foreach dir,$(SUB_DIRS),cp -R $(dir) `cat .fname`;)
cp $(AUX_FILES) `cat .fname`
tar czvf `cat .fname`.tar.gz --exclude='*.tar.gz' `cat .fname`
rm -rf `cat .fname` .fname