From: Jean-Marc Pigeon (Delson) Date: Mon, 8 Jul 2024 05:10:23 +0000 (-0400) Subject: Defining subrou module X-Git-Tag: tag-0.1~3 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=7992580d4c07d149c98d69ebee9b48e600d46ef0;p=jmp%2Fmailleur Defining subrou module --- diff --git a/app/Makefile b/app/Makefile index 00e4ca1..32e15b1 100644 --- a/app/Makefile +++ b/app/Makefile @@ -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 index 0000000..91af41f --- /dev/null +++ b/app/mailled.c @@ -0,0 +1,51 @@ +// vim: smarttab tabstop=8 shiftwidth=2 expandtab +/********************************************************/ +/* */ +/* Main SMTP Daemon */ +/* */ +/********************************************************/ +#include +#include + +/* + +*/ +/********************************************************/ +/* */ +/* */ +/********************************************************/ +/* + +*/ +/********************************************************/ +/* */ +/* 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 index 0000000..e69de29 diff --git a/lib/Makefile b/lib/Makefile index 00e4ca1..339dff8 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -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` +#-------------------------------------------------------------------- diff --git a/lib/subrou.c b/lib/subrou.c index e69de29..f2717db 100644 --- a/lib/subrou.c +++ b/lib/subrou.c @@ -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 index 0000000..8ab1215 --- /dev/null +++ b/lib/subrou.h @@ -0,0 +1,15 @@ +// vim: smarttab tabstop=8 shiftwidth=2 expandtab +/************************************************/ +/* */ +/* Low level subroutine declaration */ +/* */ +/************************************************/ +#ifndef SUBROU +#define SUBROU + +#include +#include + +#define APPNAME "mailled" //application name + +#endif diff --git a/lib/toremake b/lib/toremake new file mode 100644 index 0000000..e69de29