aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/examples/uds_dist/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel/examples/uds_dist/src/Makefile')
-rw-r--r--lib/kernel/examples/uds_dist/src/Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/kernel/examples/uds_dist/src/Makefile b/lib/kernel/examples/uds_dist/src/Makefile
new file mode 100644
index 0000000000..338d29b23d
--- /dev/null
+++ b/lib/kernel/examples/uds_dist/src/Makefile
@@ -0,0 +1,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)
+