forked from casper-astro/katcp_devel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (23 loc) · 1.03 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
include Makefile.inc
###############################################################################
LIBRARY = katcp
APPS = kcs cmd examples sq bulkread tmon log fmon modules tcpborphserver3 msg delay par sgw xport con dmon
MISC = scripts misc
EVERYTHING = $(LIBRARY) $(APPS) $(MISC)
###############################################################################
all: $(patsubst %,%-all,$(EVERYTHING))
clean: $(patsubst %,%-clean,$(EVERYTHING))
install: $(patsubst %,%-install,$(EVERYTHING))
$(patsubst %,%-all,$(APPS)): $(patsubst %,%-all,$(LIBRARY))
%-all %-clean %-install:
$(MAKE) -C $(shell echo $@ | cut -f1 -d- ) KATCP=../$(KATCP) $(shell echo $@ | cut -f2 -d-)
###############################################################################
# old style build, can not be run in parallel
#
# all: all-dir
# clean: clean-dir
# install: install-dir
#
# warning: below rewrites KATCP for subdirectory
# all-dir clean-dir install-dir:
# @for d in $(SUB); do if ! $(MAKE) -C $$d KATCP=../$(KATCP) $(subst -dir,,$@) ; then exit; fi; done