aboutsummaryrefslogtreecommitdiff
path: root/Src/replicant/Wasabi/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Src/replicant/Wasabi/Makefile')
-rw-r--r--Src/replicant/Wasabi/Makefile42
1 files changed, 42 insertions, 0 deletions
diff --git a/Src/replicant/Wasabi/Makefile b/Src/replicant/Wasabi/Makefile
new file mode 100644
index 00000000..444701b5
--- /dev/null
+++ b/Src/replicant/Wasabi/Makefile
@@ -0,0 +1,42 @@
+MODULE_NAME := Wasabi
+
+CPPSOURCES := api.cpp ServiceManager.cpp SysCallbacks.cpp
+
+LIBRARY_FILENAME := lib$(MODULE_NAME).a
+OUTPUT_PATH := ../build/$(MODULE_NAME)
+ARCHIVE_PATH := ../build/lib
+LIBRARY_FILEPATH := ../build/lib/$(LIBRARY_FILENAME)
+
+CPPOBJS := $(patsubst %.cpp,$(OUTPUT_PATH)/%.o,$(CPPSOURCES))
+CPPDEPS := $(patsubst %.o,$(OUTPUT_PATH)/%.d,$(CPPOBJS))
+COBJS := $(patsubst %.c,$(OUTPUT_PATH)/%.o,$(CSOURCES))
+CDEPS := $(patsubst %.o,$(OUTPUT_PATH)/%.d,$(COBJS))
+
+OBJS := $(CPPOBJS) $(COBJS)
+DEPS := $(CPPDEPS) $(CDEPS)
+
+CFLAGS=-I..
+CPPFLAGS := ${CFLAGS}
+
+
+
+build: build-dir $(LIBRARY_FILEPATH)
+
+build-dir:
+ @mkdir -p $(OUTPUT_PATH) > /dev/null 2> /dev/null
+ @mkdir -p $(ARCHIVE_PATH) > /dev/null 2> /dev/null
+
+dep:
+ @rm ${DEPS}
+
+$(OUTPUT_PATH)/%.o: %.cpp
+ #@echo Compiling $*.cpp
+ @$(CXX) $(CPPFLAGS) -MMD -MF $(OUTPUT_PATH)/$*.d -MT $(OUTPUT_PATH)/$*.o -c $*.cpp -o $(OUTPUT_PATH)/$*.o
+
+$(LIBRARY_FILEPATH): ${OBJS}
+ $(AR) rcs $@ ${OBJS}
+
+clean:
+ -rm -f ${OBJS} $(LIBRARY_FILENAME) ${DEPS}
+
+-include $(DEPS)