From 40c74e69eec5152aac6c5420bf0e532e9b7fd0b2 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Sun, 14 Oct 2018 18:00:19 +0800
Subject: [PATCH] tidy modules folders, put them in c and python folders

---
 program/modules/python/sht20.py   |    0 
 /dev/null                         |   11 -----
 program/modules/c/ds18b20.c       |    0 
 program/modules/python/ds18b20.py |    0 
 program/modules/c/makefile        |   70 +++++++++++++++++++++++++++++++++++
 program/modules/c/sht20.c         |    0 
 6 files changed, 70 insertions(+), 11 deletions(-)

diff --git a/program/modules/ds18b20/ds18b20.c b/program/modules/c/ds18b20.c
similarity index 100%
rename from program/modules/ds18b20/ds18b20.c
rename to program/modules/c/ds18b20.c
diff --git a/program/modules/c/makefile b/program/modules/c/makefile
new file mode 100644
index 0000000..c4d4d6e
--- /dev/null
+++ b/program/modules/c/makefile
@@ -0,0 +1,70 @@
+#*********************************************************************************
+#      Copyright:  (C) 2012 Guo Wenxue<Email:guowenxue@gmail.com QQ:281143292>
+#                  All rights reserved.
+#
+#       Filename:  Makefile
+#    Description:  This Makefile used to compile all the C source code file in current 
+#                  folder to respective excutable binary files.
+#                      
+#        Version:  1.0.0(10/08/2011~)
+#                  Author:  Guo Wenxue <guowenxue@gmail.com>
+#      ChangeLog:  1, Release initial version on "11/11/2011 01:29:33 PM"
+#                       
+#********************************************************************************/
+
+PWD=$(shell pwd)
+INSTPATH=/usr/bin
+
+CFLAGS+=-I${PWD}
+#CFLAGS+=-Wall -Werror
+
+LDFLAGS+=-lwiringPi
+LDFLAGS+=-lpthread
+
+VPATH= .
+SRCS = $(wildcard ${VPATH}/*.c)
+OBJS = $(patsubst %.c,%.o,$(SRCS))
+
+#CC=arm-linux-
+export CC=${CROSS_COMPILE}gcc
+export CXX=${CROSS_COMPILE}g++
+export AR=${CROSS_COMPILE}ar
+export AS=${CROSS_COMPILE}as
+export RANLIB=${CROSS_COMPILE}ranlib
+export STRIP=${CROSS_COMPILE}strip
+export CFLAGS
+export LDFLAGS
+
+SRCFILES = $(wildcard *.c)
+BINARIES=$(SRCFILES:%.c=%)
+
+all: entry binaries 
+entry: 
+	@echo " ";
+	@echo " =========================================================";
+	@echo " **        Compile \"${BINARIES}\" for ${ARCH}         ";
+	@echo " =========================================================";
+
+binaries:  ${BINARIES} 
+	@echo " Compile over"
+
+%:  %.c 
+	$(CC) $(CFLAGS) -o $@ $<  ${LDFLAGS}
+
+tag: 
+	@ctags --c-kinds=+defglmnstuvx --langmap=c:.c.h.ho.hem.het.hec.hev.him.hit.hic.hiv -R .  
+	@cscope -Rbq
+
+install:
+	@cp $(BINARIES) ${INSTPATH}
+
+clean: 
+	@rm -f version.h 
+	@rm -f *.o $(BINARIES) 
+	@rm -rf *.gdb *.a *.so *.elf*
+
+distclean: clean
+	@rm -f  tags cscope*
+
+.PHONY: clean entry
+
diff --git a/program/modules/sht20/sht20.c b/program/modules/c/sht20.c
similarity index 100%
rename from program/modules/sht20/sht20.c
rename to program/modules/c/sht20.c
diff --git a/program/modules/ds18b20/makefile b/program/modules/ds18b20/makefile
deleted file mode 100644
index cbae8a0..0000000
--- a/program/modules/ds18b20/makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-INST_PATH=/usr/bin
-BIN_NAME=ds18b20
-
-all: 
-	gcc ${BIN_NAME}.c -o ${BIN_NAME}
-
-clean: 
-	rm -f ${BIN_NAME}
-
-install: 
-	@cp ${BIN_NAME} ${INST_PATH}
diff --git a/program/modules/ds18b20/ds18b20.py b/program/modules/python/ds18b20.py
similarity index 100%
rename from program/modules/ds18b20/ds18b20.py
rename to program/modules/python/ds18b20.py
diff --git a/program/modules/sht20/sht20.py b/program/modules/python/sht20.py
similarity index 100%
rename from program/modules/sht20/sht20.py
rename to program/modules/python/sht20.py
diff --git a/program/modules/sht20/makefile b/program/modules/sht20/makefile
deleted file mode 100644
index 2a6c812..0000000
--- a/program/modules/sht20/makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-INST_PATH=/usr/bin
-BIN_NAME=sht20
-
-all: 
-	gcc ${BIN_NAME}.c -o ${BIN_NAME}
-
-clean: 
-	rm -f ${BIN_NAME}
-
-install: 
-	@cp ${BIN_NAME} ${INST_PATH}

--
Gitblit v1.9.1