aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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