aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-09-10 17:41:52 +0800
committerMistivia <i@mistivia.com>2025-09-10 17:41:52 +0800
commit8d089010b37ee193b2b8c809a4f317fa2b11a758 (patch)
treef2a671f9bcc8760983ab016d8d181f2630fe16a7 /Makefile
rtmp server
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..6f6d633
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+CC := gcc
+CXX := g++
+CFLAGS := -g -Wall
+CXXFLAGS := -g -Wall -std=c++14
+
+C_SOURCES := $(shell find . -maxdepth 1 -name '*.c')
+CPP_SOURCES := $(shell find . -maxdepth 1 -name '*.cpp')
+
+C_OBJS := $(C_SOURCES:.c=.o)
+CPP_OBJS := $(CPP_SOURCES:.cpp=.o)
+
+TARGET := ezlive
+
+all: $(TARGET)
+
+$(TARGET): $(C_OBJS) $(CPP_OBJS)
+ $(CXX) $(C_OBJS) $(CPP_OBJS) -o $@
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+%.o: %.cpp
+ $(CXX) $(CXXFLAGS) -c $< -o $@
+
+clean:
+ rm -f $(C_OBJS) $(CPP_OBJS) $(TARGET)
+
+.PHONY: all clean \ No newline at end of file