summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..56949db
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,45 @@
+#path to find lib and header files
+#vpath %.a ../lib
+#vpath %.h ../inc
+
+CCC=g++
+CC=g++
+
+
+INCLUDEPATH+=-I../inc
+
+CFLAGS= -g3 -Wall -fPIC -Werror -O0
+CFLAGS+=$(INCLUDEPATH)
+
+CPPFLAGS=$(CFLAGS)
+
+LIB+=-lMESA_handle_logger
+LIB+=-lMESA_prof_load
+
+SOURCES=$(wildcard *.c)
+OBJECTS=$(SOURCES:.c=.o)
+DEPS=$(SOURCES:.c=.d)
+
+#target name
+TARGET=ntc_ip_comm.so
+
+.PHONY:clean all
+
+all:$(TARGET)
+
+$(TARGET):$(OBJECTS) $(LIB_FILE)
+ $(CC) -shared $(CFLAGS) $(OBJECTS) $(LIB) -o $@
+#copy target to dest dir
+ @awk '/VERSION/{print $$2}' $(SOURCES) |xargs -i echo -e "make \033[32;49;1m$@({})\033[32;49;0m \033[31;49;1m[success]\033[31;49;0m"
+ @cp -f $@ ../bin
+ @echo -e "copy \033[32;49;1m$@\033[32;49;0m to ../bin\033[31;49;1m[success]\033[31;49;0m"
+
+.c.o:
+
+%.d:%.c
+ $(CC) $< -MM $(INCLUDEPATH) > $@
+
+-include $(DEPS)
+
+clean :
+ rm -f $(OBJECTS) $(DEPS) $(TARGET)