added t1 t2 and readme

This commit is contained in:
2020-05-17 12:16:22 +02:00
committed by GitHub
parent 77d02fc093
commit 778bbe1ff2
16 changed files with 117 additions and 0 deletions

8
trial1/fun1.c Normal file
View File

@@ -0,0 +1,8 @@
#include "fun1.h"
int fun1()
{
printf("Hello from FN1\n");
// fun2();
return 0;
}

5
trial1/fun1.h Normal file
View File

@@ -0,0 +1,5 @@
#include <stdio.h>
int fun1();

8
trial1/include/fun2.c Normal file
View File

@@ -0,0 +1,8 @@
#include "fun2.h"
int fun2()
{
printf("Hello from FN2\n");
return 0;
}

1
trial1/include/fun2.h Normal file
View File

@@ -0,0 +1 @@
int fun2();

BIN
trial1/main Normal file

Binary file not shown.

9
trial1/main.c Normal file
View File

@@ -0,0 +1,9 @@
#include "fun1.h"
int main()
{
printf("Hello World\n");
fun1();
return 0;
}

19
trial1/makefile Normal file
View File

@@ -0,0 +1,19 @@
CC=gcc
IDIR=./include
LDIR=./lib
ODIR=./out
_DEPS = fun1.h
DEPS = $(pathsbst %,(IDIR)/%,%(_DEPS))
CFLAGS= -I. -T$(IDIR)
.PHONY: all clean
all: main.c fun1.c
${CC} -o $(ODIR)/main2 main.c fun1.c
clean:
rm -r $(ODIR)/*
rm -r ./keys/*

BIN
trial1/out/main2 Normal file

Binary file not shown.