]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Defining subrou module
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 8 Jul 2024 05:10:23 +0000 (01:10 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 8 Jul 2024 05:10:23 +0000 (01:10 -0400)
app/Makefile
app/mailled.c [new file with mode: 0644]
app/toremake [new file with mode: 0644]
lib/Makefile
lib/subrou.c
lib/subrou.h [new file with mode: 0644]
lib/toremake [new file with mode: 0644]

index 00e4ca1ced990c78831f4bd162834143c85f4622..32e15b1e8ec64396c19e6a5ae77ab3b1643a8947 100644 (file)
@@ -1 +1,47 @@
+#--------------------------------------------------------------------
+#Executable generation area
+#--------------------------------------------------------------------
+debug  : 
+           @ $(MAKE) OPTIME="-g" DEBUG="-DDEBUG" exe 
+           @ echo "application compiled in '$@' mode now ready"
+
+prod   :
+          @ $(MAKE) OPTIME="-g2" exe
+          @ echo "application compiled in '$@' mode now ready"
+
+exe    :
+          $(MAKE) $(EXE)
+
+
 clean  :
+          - rm -fr *.o $(EXE)
+          - rm -fr ../bin/*
+
+#--------------------------------------------------------------------
+#Equivalences
+#--------------------------------------------------------------------
+EXE=                                                           \
+       mailled                                                 \
+
+SRC=                                                           \
+       mailled.c                                               \
+
+#--------------------------------------------------------------------
+#definitions
+#--------------------------------------------------------------------
+CC     =  gcc
+LD     =  gcc
+CFLAGS =  -I ../lib -Wall $(OPTIME)
+LIBAI  =  ../lib/libAI.a
+LIBS   =  $(LIBAI) 
+#--------------------------------------------------------------------
+#Dependances
+#--------------------------------------------------------------------
+mailled        :  toremake mailled.o
+          @ $(LD) $(LDFLAGS) -o ../bin/$@ $@.o $(LIBS)
+
+toremake:  Makefile $(LIBAI)
+          touch toremake
+          - rm -f $(EXE) *.o
+
+#--------------------------------------------------------------------
diff --git a/app/mailled.c b/app/mailled.c
new file mode 100644 (file)
index 0000000..91af41f
--- /dev/null
@@ -0,0 +1,51 @@
+// vim: smarttab tabstop=8 shiftwidth=2 expandtab
+/********************************************************/
+/*                                                     */
+/*     Main SMTP Daemon                                */
+/*                                                     */
+/********************************************************/
+#include       <stdbool.h>
+#include       <stdlib.h>
+
+/*
+\f
+*/
+/********************************************************/
+/*                                                     */
+/*                                                     */
+/********************************************************/
+/*
+\f
+*/
+/********************************************************/
+/*                                                     */
+/*     Main routine                                    */
+/*             Start multiple SMTP daemon and make     */
+/*              sure there always ready to answer to    */
+/*              SMTP request.                           */
+/*                                                     */
+/********************************************************/
+int main(int argc,char *argv[])
+
+{
+int status;
+int phase;
+_Bool proceed;
+
+status=0;
+phase=0;
+proceed=true;
+while (proceed==true) {
+  switch (phase) {
+    case 0      :       //initialising process
+      break;
+    case 1      :       //checking parameters
+      break;
+    default     :       //end of task
+      proceed=false;
+      break;
+    }
+  phase++;
+  }
+(void) exit(status);
+}
diff --git a/app/toremake b/app/toremake
new file mode 100644 (file)
index 0000000..e69de29
index 00e4ca1ced990c78831f4bd162834143c85f4622..339dff8c8bbb4a73c617daae6db53f6abaf04c84 100644 (file)
@@ -1 +1,44 @@
+#--------------------------------------------------------------------
+#Executable generation area
+#--------------------------------------------------------------------
+debug  :  toremake
+          @ $(MAKE) $(PAR) OPTIME="-g" objs
+          @ echo "library compiled in '$@' mode, now ready"
+
+prod   :  toremake
+          @ $(MAKE) $(PAR) OPTIME="-O3" objs
+          @ echo "library compiled in '$@' mode, now ready"
+
 clean  :
+          - rm -fr *.o *.a
+
+#--------------------------------------------------------------------
+#Equivalences
+#--------------------------------------------------------------------
+OBJS=                                          \
+         subrou.o 
+
+objs   : $(OBJS)
+         @ ar -cr libAI.a $(OBJS)
+
+#--------------------------------------------------------------------
+#Dependances
+
+subrou.o:                                      \
+          subrou.h subrou.c
+
+#--------------------------------------------------------------------
+
+toremake:  Makefile
+          touch toremake
+          - rm -f $(OBJS) libAI.a
+
+#--------------------------------------------------------------------
+#definitions
+#--------------------------------------------------------------------
+CC     = gcc
+LD     = gcc
+CFLAGS = -Wall $(OPTIME)
+LIBAI  = libAI
+PAR    = -j`/usr/bin/getconf _NPROCESSORS_ONLN`
+#--------------------------------------------------------------------
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f2717db903ece21732431d86ab638337571cbcbc 100644 (file)
@@ -0,0 +1,12 @@
+// vim: smarttab tabstop=8 shiftwidth=2 expandtab
+/********************************************************/
+/*                                                     */
+/*     Module for low level subroutine                 */
+/*                                                     */
+/********************************************************/
+#include       "subrou.h"
+
+
+//version definition 
+#define VERSION "0.1"
+#define RELEASE "1"
diff --git a/lib/subrou.h b/lib/subrou.h
new file mode 100644 (file)
index 0000000..8ab1215
--- /dev/null
@@ -0,0 +1,15 @@
+// vim: smarttab tabstop=8 shiftwidth=2 expandtab
+/************************************************/
+/*                                             */
+/*     Low level subroutine declaration        */
+/*                                             */
+/************************************************/
+#ifndef        SUBROU
+#define SUBROU
+
+#include        <linux/types.h>
+#include       <stdarg.h>
+
+#define APPNAME "mailled"        //application name
+
+#endif
diff --git a/lib/toremake b/lib/toremake
new file mode 100644 (file)
index 0000000..e69de29