1
0
mirror of https://github.com/ioacademy-jikim/debugging synced 2026-08-22 05:42:58 +00:00

first commit

This commit is contained in:
jikim
2015-12-13 22:34:58 +09:00
commit 0b589c7986
9455 changed files with 4350134 additions and 0 deletions
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
sflsjflsjf s
sdlkfjslkfjs
'f
+8
View File
@@ -0,0 +1,8 @@
// foo.c
#include <stdio.h>
#include <foo.h>
void foo()
{
printf("foo : %d\n", FOO);
}
+5
View File
@@ -0,0 +1,5 @@
// foo.h
#define FOO 100
void foo();
Binary file not shown.
+8
View File
@@ -0,0 +1,8 @@
// goo.c
#include <stdio.h>
#include <goo.h>
void goo()
{
printf("goo : %d\n", GOO);
}
+5
View File
@@ -0,0 +1,5 @@
// goo.h
#define GOO 200
void goo();
Binary file not shown.
+11
View File
@@ -0,0 +1,11 @@
// main.c
#include <stdio.h>
#include <foo.h>
#include <goo.h>
int main()
{
foo();
goo();
return 0;
}
Binary file not shown.
+11
View File
@@ -0,0 +1,11 @@
# makefile 1
# make 로 실행하면 아무것도 안됨을 설명
# make foo 로 실행할것
# for each xxxxx.o target there must be a xxxxx.c dependency to build.
.c.o:
cc -c $< -I.
+10
View File
@@ -0,0 +1,10 @@
# makefile2
# .c.o 뿐 아니라 모든 파일 확장자가 가능함을 설명
#.SUFFIXES: .txt .log
.txt.log:
@echo "Converting " $< " to " $*.log
mv $< $*.log
+15
View File
@@ -0,0 +1,15 @@
# makefile3
# 아래 코드를 사용해 보고
# 문제점은 각 헤더에 dependecy 임을 이야기 하고
# makefile4를 수업.
.c.o:
@echo "Compiling" $< "..."
cc -c $< -I.
app: main.o foo.o goo.o
@echo "Building target" $@ "..."
cc -o app main.o foo.o goo.o
#problem dependency
+13
View File
@@ -0,0 +1,13 @@
# makefile4
.c.o:
@echo "Compiling" $< "..."
cc -c $< -I.
app: main.o foo.o goo.o
@echo "Building target" $@ "..."
cc -o app main.o foo.o goo.o
main.o:foo.h goo.h
foo.o:foo.h
foo.o:goo.h