Create an overall abCalc module and hook up the init routines

This commit is contained in:
Jeremy Rand 2013-07-24 11:06:36 -05:00
parent b8e9fd0c9c
commit 5e7006a3cc
4 changed files with 45 additions and 6 deletions

View File

@ -1,4 +1,4 @@
OBJS=abCalc.o abCalcExpr.o abCalcExprReal.o abCalcExprInt.o abCalcStack.o abCalcMode.o
OBJS=abCalc.o abCalcExpr.o abCalcExprReal.o abCalcExprInt.o abCalcStack.o abCalcMode.o abCalcMain.o
NAME=abCalc
all: $(NAME)
@ -8,6 +8,7 @@ abCalcExprReal.o: abCalcExpr.h abCalcExprReal.h
abCalcStack.o: abCalcExpr.h abCalcStack.h
abCalcMode.o: abCalcMode.h abCalcExpr.h
abCalcExprInt.o: abCalcExpr.h abCalcMode.h abCalcExprInt.h
abCalc.o: abCalcExpr.h abCalcMode.h abCalcExprReal.h abCalcExprInt.h abCalcStack.h
$(NAME): $(OBJS)
cc -o $(NAME) $(OBJS)

View File

@ -1,9 +1,24 @@
#include <stdio.h>
#include <stdlib.h>
/*
abCalc.c
By: Jeremy Rand
*/
int main(void)
#include "abCalcExpr.h"
#include "abCalcExprInt.h"
#include "abCalcExprReal.h"
#include "abCalcMode.h"
#include "abCalcStack.h"
void abCalcInit(void)
{
printf("Hello, world!\n");
exit(0);
abCalcExprInit();
abCalcExprRealInit();
abCalcExprIntInit();
abCalcModeInit();
abCalcStackInit();
}

14
abCalc.h Normal file
View File

@ -0,0 +1,14 @@
/*
abCalc.h
By: Jeremy Rand
*/
#ifndef ABCALC_H
#define ABCALC_H
void abCalcInit(void);
#endif

9
abCalcMain.c Normal file
View File

@ -0,0 +1,9 @@
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
printf("Hello, world!\n");
exit(0);
}