aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/examples/uds_dist/src/Makefile
blob: 338d29b23d9afa6d62a64a6e5e7d0972ac902fc4 (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
# Example makefile

RM=rm -f
CP=cp
EBIN=../ebin
EMULATOR=beam
ERLC=erlc
# Works if building in open source source tree
KERNEL_INCLUDE=$(ERL_TOP)/lib/kernel/src
ERLCFLAGS+= -W -b$(EMULATOR) -I$(KERNEL_INCLUDE)
APP=uds_dist.app

MODULES=uds_server uds uds_dist

TARGET_FILES=$(MODULES:%=$(EBIN)/%.$(EMULATOR))

opt: $(TARGET_FILES) $(EBIN)/$(APP) 

$(EBIN)/%.$(EMULATOR): %.erl
	$(ERLC) $(ERLCFLAGS) -o$(EBIN) $<

$(EBIN)/$(APP): $(APP)
	$(CP) $(APP) $(EBIN)/$(APP)

clean:
	$(RM) $(TARGET_FILES) $(EBIN)/$(APP)