From 4638e3c3fb487f635823bf41d121dda25b4a3f35 Mon Sep 17 00:00:00 2001 From: Jieun <yjeka@ajou.ac.kr> Date: Fri, 14 Aug 2020 20:29:45 +0900 Subject: [PATCH] Fix folder name --- {pointer => 08_11_pointer}/README.md | 0 .../pointer_practice/1.ptr_var.c | 0 .../pointer_practice/2.constPtrVar.c | 0 .../pointer_practice/4.ptr_op1.c | 0 .../pointer_practice/5.ptr_op2.c | 0 .../pointer_practice/6.ptrNarray1.c | 0 .../pointer_practice/7.ptrNarray2.c | 0 .../pointer_practice/8.functionPtr1.c | 0 {pointer => 08_11_pointer}/test-const1.c | 0 {pointer => 08_11_pointer}/test-const2.c | 0 {pointer => 08_11_pointer}/test0-hack-point.c | 0 {pointer => 08_11_pointer}/test1-type-conv.c | 0 .../test3-const-but-change.c | 0 {pointer => 08_11_pointer}/test4.c | 0 {pointer => 08_11_pointer}/test5.c | 0 {pointer => 08_11_pointer}/test6.c | 0 {pointer => 08_11_pointer}/test7.c | 0 {thread => 08_12_thread}/1.hellothread_st.c | 0 {thread => 08_12_thread}/2.mymutexthread_st.c | 0 {thread => 08_12_thread}/Makefile | 0 {thread => 08_12_thread}/README.md | 4 +- {thread => 08_12_thread}/sample.txt | 0 {thread => 08_12_thread}/thread.c | 0 ledTest/README.md | 60 ------ ledTest/ledTest.c | 17 -- printf/README.md | 62 ------ printf/hello.c | 12 -- printf/input_data | 1 - printf/output_data | 1 - printf/stderr.txt | 1 - printf/stdout.txt | 1 - three_files/Makefile | 15 -- three_files/README.md | 188 ------------------ three_files/func.c | 15 -- three_files/func.h | 3 - three_files/main | Bin 8368 -> 0 bytes three_files/main.c | 11 - three_files/make/make1 | 8 - three_files/make/make2 | 16 -- three_files/make/make3 | 18 -- three_files/make/make4 | 18 -- three_files/make/make5 | 20 -- three_files/make/make6 | 18 -- three_files/make/make7 | 15 -- 44 files changed, 3 insertions(+), 501 deletions(-) rename {pointer => 08_11_pointer}/README.md (100%) rename {pointer => 08_11_pointer}/pointer_practice/1.ptr_var.c (100%) rename {pointer => 08_11_pointer}/pointer_practice/2.constPtrVar.c (100%) rename {pointer => 08_11_pointer}/pointer_practice/4.ptr_op1.c (100%) rename {pointer => 08_11_pointer}/pointer_practice/5.ptr_op2.c (100%) rename {pointer => 08_11_pointer}/pointer_practice/6.ptrNarray1.c (100%) rename {pointer => 08_11_pointer}/pointer_practice/7.ptrNarray2.c (100%) rename {pointer => 08_11_pointer}/pointer_practice/8.functionPtr1.c (100%) rename {pointer => 08_11_pointer}/test-const1.c (100%) rename {pointer => 08_11_pointer}/test-const2.c (100%) rename {pointer => 08_11_pointer}/test0-hack-point.c (100%) rename {pointer => 08_11_pointer}/test1-type-conv.c (100%) rename {pointer => 08_11_pointer}/test3-const-but-change.c (100%) rename {pointer => 08_11_pointer}/test4.c (100%) rename {pointer => 08_11_pointer}/test5.c (100%) rename {pointer => 08_11_pointer}/test6.c (100%) rename {pointer => 08_11_pointer}/test7.c (100%) rename {thread => 08_12_thread}/1.hellothread_st.c (100%) rename {thread => 08_12_thread}/2.mymutexthread_st.c (100%) rename {thread => 08_12_thread}/Makefile (100%) rename {thread => 08_12_thread}/README.md (94%) rename {thread => 08_12_thread}/sample.txt (100%) rename {thread => 08_12_thread}/thread.c (100%) delete mode 100644 ledTest/README.md delete mode 100644 ledTest/ledTest.c delete mode 100644 printf/README.md delete mode 100644 printf/hello.c delete mode 100644 printf/input_data delete mode 100644 printf/output_data delete mode 100644 printf/stderr.txt delete mode 100644 printf/stdout.txt delete mode 100644 three_files/Makefile delete mode 100644 three_files/README.md delete mode 100644 three_files/func.c delete mode 100644 three_files/func.h delete mode 100644 three_files/main delete mode 100644 three_files/main.c delete mode 100644 three_files/make/make1 delete mode 100644 three_files/make/make2 delete mode 100644 three_files/make/make3 delete mode 100644 three_files/make/make4 delete mode 100644 three_files/make/make5 delete mode 100644 three_files/make/make6 delete mode 100644 three_files/make/make7 diff --git a/pointer/README.md b/08_11_pointer/README.md similarity index 100% rename from pointer/README.md rename to 08_11_pointer/README.md diff --git a/pointer/pointer_practice/1.ptr_var.c b/08_11_pointer/pointer_practice/1.ptr_var.c similarity index 100% rename from pointer/pointer_practice/1.ptr_var.c rename to 08_11_pointer/pointer_practice/1.ptr_var.c diff --git a/pointer/pointer_practice/2.constPtrVar.c b/08_11_pointer/pointer_practice/2.constPtrVar.c similarity index 100% rename from pointer/pointer_practice/2.constPtrVar.c rename to 08_11_pointer/pointer_practice/2.constPtrVar.c diff --git a/pointer/pointer_practice/4.ptr_op1.c b/08_11_pointer/pointer_practice/4.ptr_op1.c similarity index 100% rename from pointer/pointer_practice/4.ptr_op1.c rename to 08_11_pointer/pointer_practice/4.ptr_op1.c diff --git a/pointer/pointer_practice/5.ptr_op2.c b/08_11_pointer/pointer_practice/5.ptr_op2.c similarity index 100% rename from pointer/pointer_practice/5.ptr_op2.c rename to 08_11_pointer/pointer_practice/5.ptr_op2.c diff --git a/pointer/pointer_practice/6.ptrNarray1.c b/08_11_pointer/pointer_practice/6.ptrNarray1.c similarity index 100% rename from pointer/pointer_practice/6.ptrNarray1.c rename to 08_11_pointer/pointer_practice/6.ptrNarray1.c diff --git a/pointer/pointer_practice/7.ptrNarray2.c b/08_11_pointer/pointer_practice/7.ptrNarray2.c similarity index 100% rename from pointer/pointer_practice/7.ptrNarray2.c rename to 08_11_pointer/pointer_practice/7.ptrNarray2.c diff --git a/pointer/pointer_practice/8.functionPtr1.c b/08_11_pointer/pointer_practice/8.functionPtr1.c similarity index 100% rename from pointer/pointer_practice/8.functionPtr1.c rename to 08_11_pointer/pointer_practice/8.functionPtr1.c diff --git a/pointer/test-const1.c b/08_11_pointer/test-const1.c similarity index 100% rename from pointer/test-const1.c rename to 08_11_pointer/test-const1.c diff --git a/pointer/test-const2.c b/08_11_pointer/test-const2.c similarity index 100% rename from pointer/test-const2.c rename to 08_11_pointer/test-const2.c diff --git a/pointer/test0-hack-point.c b/08_11_pointer/test0-hack-point.c similarity index 100% rename from pointer/test0-hack-point.c rename to 08_11_pointer/test0-hack-point.c diff --git a/pointer/test1-type-conv.c b/08_11_pointer/test1-type-conv.c similarity index 100% rename from pointer/test1-type-conv.c rename to 08_11_pointer/test1-type-conv.c diff --git a/pointer/test3-const-but-change.c b/08_11_pointer/test3-const-but-change.c similarity index 100% rename from pointer/test3-const-but-change.c rename to 08_11_pointer/test3-const-but-change.c diff --git a/pointer/test4.c b/08_11_pointer/test4.c similarity index 100% rename from pointer/test4.c rename to 08_11_pointer/test4.c diff --git a/pointer/test5.c b/08_11_pointer/test5.c similarity index 100% rename from pointer/test5.c rename to 08_11_pointer/test5.c diff --git a/pointer/test6.c b/08_11_pointer/test6.c similarity index 100% rename from pointer/test6.c rename to 08_11_pointer/test6.c diff --git a/pointer/test7.c b/08_11_pointer/test7.c similarity index 100% rename from pointer/test7.c rename to 08_11_pointer/test7.c diff --git a/thread/1.hellothread_st.c b/08_12_thread/1.hellothread_st.c similarity index 100% rename from thread/1.hellothread_st.c rename to 08_12_thread/1.hellothread_st.c diff --git a/thread/2.mymutexthread_st.c b/08_12_thread/2.mymutexthread_st.c similarity index 100% rename from thread/2.mymutexthread_st.c rename to 08_12_thread/2.mymutexthread_st.c diff --git a/thread/Makefile b/08_12_thread/Makefile similarity index 100% rename from thread/Makefile rename to 08_12_thread/Makefile diff --git a/thread/README.md b/08_12_thread/README.md similarity index 94% rename from thread/README.md rename to 08_12_thread/README.md index e3bff0e..87bd6b6 100644 --- a/thread/README.md +++ b/08_12_thread/README.md @@ -114,4 +114,6 @@ Main end! 29등 : 4 30등 : 1 ``` -sthread2가 sthread1보다 연산량이 많아 늦게 끝나는 것을 볼 수 있다. \ No newline at end of file +sthread2가 sthread1보다 연산량이 많아 늦게 끝나는 것을 볼 수 있다. + +### 2.mymutexthread.c diff --git a/thread/sample.txt b/08_12_thread/sample.txt similarity index 100% rename from thread/sample.txt rename to 08_12_thread/sample.txt diff --git a/thread/thread.c b/08_12_thread/thread.c similarity index 100% rename from thread/thread.c rename to 08_12_thread/thread.c diff --git a/ledTest/README.md b/ledTest/README.md deleted file mode 100644 index 461779f..0000000 --- a/ledTest/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# Personal Project5 : RaspberryPi에 LED 연결(2020.08.10) - -## GPIO - -### GPIO란? -* General Purpose Input/Output -* 단일 마이크로 프로레서와 같이 입출력(Input/Output) 신호를 제어할 수 있는 포트 -* 사용자가 직접 회로를 구성하고 프로그래밍하여 라즈베리파이의 GPIO를 다룰 수 있다. - -### GPIO 명령어 -1. gpio readall - * gpio map 확인 - * 각 핀의 현재 입/출력방향의 상태와 핀에 입력된 전압(0 or 1)등을 표시해준다. -2. gpio -h - * gpio 명령어 및 정보 확인 -3. man gpio - * gpio 명령어에 대한 소개 -4. gpio -g mode [핀번호] [input or output] - * - * ex) gpio -g mode 21 output => 21번 핀에 LED를 연결했다면, 출력으로 설정한다. -5. gpio -g write [핀번호] [1 or 0] - * ex) gpio -g write 29 1 => 29번 핀에 연결한 LED의 불빛이 들어온다. - -## 회로 구성 -* 준비물 : 라즈베리 파이, T자형 코블러, Breadboard(빵판), 빵판용 점퍼 와이어(전선), LED, 고정 저항기(레지스터) - - -## ledTest.c -1. wiringPi.h 헤더파일을 추가시킨다. - ```C - #include <wiringPi.h> - ``` - * wiringPi : 라즈베리 파이의 BCM2835 프로세서에 접근하는 라이브러리 -2. 핀 모드를 29번으로 설정한다.(BCM으로 21번이 wiringPi에서 29번이므로) - ```C - pinMode(29, OUTPUT); - ``` -3. for문을 이용하여 동작을 5번 실행한다. - ```C - for(i=0;i<5;i++) - { - - } - ``` -4. led를 키고 0.5초 지연시킨다. - ```C - digitalWrite(29, 1); - delay(500); - ``` -5. led를 끄고 0.5초 지연시킨다. - ```C - digitalWrite(29, 0); - delay(500); - ``` - -## 실행 결과 -* gcc ledTest.c -lwiringPi -  -  - diff --git a/ledTest/ledTest.c b/ledTest/ledTest.c deleted file mode 100644 index abec2fa..0000000 --- a/ledTest/ledTest.c +++ /dev/null @@ -1,17 +0,0 @@ -#include <stdio.h> -#include <wiringPi.h> - -int main() -{ - int i; - if(wiringPiSetup()==-1) return -1; - pinMode(29, OUTPUT); - for(i=0;i<5;i++) - { - digitalWrite(29, 1); - delay(500); - digitalWrite(29, 0); - delay(500); - } - return 0; -} \ No newline at end of file diff --git a/printf/README.md b/printf/README.md deleted file mode 100644 index dd67f9a..0000000 --- a/printf/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# Personal Project1 : printf(2020.08.03) - -## stdio.h - -### 표준 스트림 -* 표준 스트림은 Standard Stream의 약자로 컴퓨터 프로그램에서 **표준적으로** 입력으로 받고 출력으로 보내는 데이터와 매체를 총칭하는 용어 -* 표준 입력은 프로그램에 입력되는 데이터의 표준적인 출처로 stdin라고 표현 -* 표준 출력은 프로그램에서 출력되는 데이터의 표준적인 방향으로 크게 stdout과 stderr로 구분 - -### stdin, stdout, stderr -1. stdin(standart input)-0 - * 리눅스에서 표준 입력은 file descriptor가 0으로 설정 - * C, C++ - ```C - //C - FILE* stdin - ``` - ```C++ - //C++ - std::cin - ``` -2. stdout(standard output)-1 - * 정상적인 출력이 반환되는 방향 - * 리눅스에서 표준 출력은 file descriptor가 1로 설정 - * C, C++ - ```C - //C - FILE* stdout - ``` - ```C++ - //C++ - std::cout - ``` -3. stderr(standard error)-2 - * 프로그램의 비정상 종료시에 반환되는 방향 - * 리눅스에서 표준 출력은 file descriptor가 2로 설정 - * C, C++ - ```C - //C - FILE* stderr - ``` - ```C++ - //C++ - std::cerr - ``` - -## Redirection -* 표준 입력이나 표준 출력을 키보드나 화면으로 하는 것이 아니라 파일로 입력받거나 파일로 출력하도록 변경하는 것 -* `> file` - * 표준 출력을 파일로 redirection - * 파일이 없으면 새로 만들고, 파일이 있으면 덮어쓴다. -* `>> file` - * 표준 출력을 파일로 redirection - * 파일이 없으면 새로 만들고, 파일이 있으면 파일의 끝에 덧붙인다. -* `2>&1` - * 표준 에러를 표준 출력으로 redirection - * 표준 에러도 표준 출력의 자격으로 보내진다. -* `< file` - * 파일로부터 표준 입력을 받도록 redirection -* ex) - * ./a.out < input_data > output_data - 입력값은 input_data에서 받고 output_data에 출력된다. diff --git a/printf/hello.c b/printf/hello.c deleted file mode 100644 index aefbe1f..0000000 --- a/printf/hello.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdio.h> - -int main() -{ - int a; - fscanf(stdin, "%d", &a); - if(a > 0) - fprintf(stderr, "Error: It is positive.\n"); - else - fprintf(stderr, "Error: It is negative.\n"); - fprintf(stdout, "Hello, World %-10d\n", a); -} diff --git a/printf/input_data b/printf/input_data deleted file mode 100644 index 08839f6..0000000 --- a/printf/input_data +++ /dev/null @@ -1 +0,0 @@ -200 diff --git a/printf/output_data b/printf/output_data deleted file mode 100644 index 4d6b988..0000000 --- a/printf/output_data +++ /dev/null @@ -1 +0,0 @@ -Hello, World 200 diff --git a/printf/stderr.txt b/printf/stderr.txt deleted file mode 100644 index 2864cf6..0000000 --- a/printf/stderr.txt +++ /dev/null @@ -1 +0,0 @@ -Error: It is positive. diff --git a/printf/stdout.txt b/printf/stdout.txt deleted file mode 100644 index 5acd122..0000000 --- a/printf/stdout.txt +++ /dev/null @@ -1 +0,0 @@ -Hello, World 2000 diff --git a/three_files/Makefile b/three_files/Makefile deleted file mode 100644 index 6a9c6a4..0000000 --- a/three_files/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -SRCS := func.c main.c -OBJS := $(SRCS:.c=.o) -CC := gcc -CFLAGS = -Wall -g - -test : $(OBJS) - $(CC) -o $@ $^ - -#dummy target -clean : - -rm $(OBJS) - rm test - -dep : - gccmakedep $(SRCS) diff --git a/three_files/README.md b/three_files/README.md deleted file mode 100644 index 97eee27..0000000 --- a/three_files/README.md +++ /dev/null @@ -1,188 +0,0 @@ -# Personal Project2 : three_files(2020.08.05) - -## C Compile and Execution -1. Compile, Preprocessor Directive -2. Compile User Source Code, Generate Assembly -3. Link Assembler, Generate Excutable Code -4. Loader, Loads the executable code into memory - -## gcc를 통해 컴파일 하는 방법 -1. gcc [소스파일 이름] - - * gcc를 사용하여 컴파일에 성공하면 a.out이라는 파일이 생긴다. - -2. ./a.out - - * 생성된 a.out 파일을 이용하여 실행한다. - * 컴파일 과정에서 실행파일의 이름을 정해주지 않으면 기본적으로 a.out이라는 이름으로 생긴다. - -## gcc compile option -1. gcc -c - - * 소스 파일을 컴파일만 하고 링크는 수행하지 않는다. - * *.o 파일을 생성한다. - * ex) gcc -c main.c func.c => main.o func.o 파일 생성 - -2. gcc -o [소스파일 이름] [컴파일할 파일] - - * 바이너리 형식의 출력 파일 이름을 지정한다.(지정하지 않으면 a.out) - -3. gcc -E - - * 컴파일의 첫 단계인 전처리까지만 실행한 결과를 출력한다. - * ex) gcc -E func.c => 매우 방대한 내용이 소스파일 위에 붙는다. - -4. gcc main.c func.o -o main - - * main.c 파일을 컴파일하여 오브젝트 파일을 만들고 func.o 파일과 링킹하여 main이라는 실행 프로그램을 만든다. - -5. gcc -D - - * 매크로를 외부에서 define할 때 사용한다. - * ex) gcc -D PRINT_ID => 소스 내에서 #define PRINT_ID를 추가한 것과 동일하다. - -6. gcc -U - - * -D와 반대로 소스 파일 내에 #undef [매크로] 옵션을 추가한 것과 동일하다. - -## three_files 컴파일 -1. gcc -D PRINT_ID로 컴파일 할 때 - - * gcc -D PRINT_ID main.c func.c - * PRINT_ID가 정의되어 있으므로 학번 출력 - -2. gcc -D PRINT_ID로 컴파일 하지 않을 때 - - * gcc main.c func.c - * PRINT_ID가 정의되어 있지 않으므로 이름 출력 - -3. 조건부 컴파일 - - * #ifdef []: 만약 []가 정의되어 있다면 처리하고 그렇지 않으면 건너뛴다. - * #else, #elif - * #endif : 조건부 컴파일의 종료를 나타낸다. - -# Personal Project3 : 컴파일러와 인터프리터의 차이 & gcc 컴파일 옵션(2020.08.06) - -## 컴파일러 vs 인터프리터 -1. 컴파일러 - - * 고급언어로 쓰여진 프로그램이 컴퓨터에서 수행되기 위해서 컴퓨터가 직접 이해할 수 있는 언어로 바꾸어 주는 프로그램 - * 번역과 실행 과정을 거쳐야하므로 번역 과정이 번거롭고 번역 시간이 오래 걸린다. 하지만 한 번 번역한 후에는 다시 번역하지 않으므로 속도가 빠르다. - -2. 인터프리터 - - * 프로그램을 한 단계씩 기계어로 해석하여 실행하는 **언어처리 프로그램** - * 줄 단위로 번역, 실행되기 때문에 시분할 시스템에 유용하며 원시 프로그램의 변화에 대한 반응이 빠르다. - * 대화형 언어에 적합하지만 실행 시간이 길어 속도가 늦다 - - -||컴파일러|인터프리터| -|---|---|---| -|번역 단위|전체|한줄씩| -|실행 속도|빠름|느림| -|번역 속도|느림|빠름| -|실행 파일|생성함|생성하지 않음| - -## gcc 컴파일 옵션 연습 -1. gcc -E - * 전처리까지만 실행한 결과를 화면에 출력한다. -  - * 01.option-E.i 생성 -  - - -2. gcc -S : 컴파일 단계만 실행 - * 전처리된 파일을 어셈블리 파일로 컴파일까지만 수행한다. - * 02.option-S.s 생성 -  - - -3. gcc -c : 컴파일과 어셈블 - * 어셈블까지만 수행하고 링크는 수행하지 않는다. - * 03.option-c.o 생성 -  - -4. gcc -g - * gdb에게 제공하는 정보를 바이너리에 삽입한다. - * 디버깅 정보가 담긴 실행파일을 생성한다. - * a.out 생성 -  - -5. gcc -Wall - * 모든 모호한 코딩에 대해서 경고를 보내는 옵션이다. -  - -6. gcc -o : 출력 파일 지정 - * 실행파일을 만든다. - * 이름이 00인 실행파일 만들기 -  - * 이름이 01.exe인 실행파일 만들기 -  - -7. gcc -D : 매크로 지정 - * 매크로를 외부에서 define할 때 사용한다. -  - -# Personal Project4 : Makefile 만들기(2020.08.07) - -## make란? -* **maintain, update, and regenerate group of progrmas** -* 명령을 생성하는 유틸리티, 프로그램 그룹을 유지하는데 필요한 유틸리티 -* **많은 프로그램 모듈들로 구성된 프로그램을 효율적으로 유지하고 일관성 있게 관리하도록 도와주는 도구** -* 소스 수정 시 유관 파일들을 재컴파일 & 링크하는 반복적인 작업을 간단하게 처리함 - -## make의 동작 -* **make는 여러 파일들 간의 의존성을 저장하고 수정된 파일에 연관된 소스 파일들만을 재컴파일 하도록 해줌** -* make 유틸리티는 이전에 make명령을 실행했던 시점 이후에 이뤄진 프로젝트 작업들에 대해서만 갱신 작업을 수행함 -* 개별 항목은 순서에 따라 실행되지만 전체 내용은 순서를 따르지 않음 - -## make 필요성 -* **프로그램 개발 및 유지보수의 편리성을 지원** -* 명령어의 배치 처리 기능, 자주 쓰는 명령어를 자동화할 수 있음 -* 자동적으로 특정 프로그램 수행을 원할 때 - -## Makefile 작성 -1. 빌드 규칙(Rule) 블록 - ```Text - <Target> : <Dependencies> - <Recipe> - ``` - * Target : 빌드 대상 이름. 최종적으로 생성해내는 파일명 - * Dependencies or prerequisities : 빌드 대상이 의존하는 Target이나 파일 목록. 이곳에 나열된 대상들을 먼저 만들고 빌드 대상 생성 - * Recipe : 빌드 대상을 생성하는 명령. 각 줄 시작에 반드시 `Tab`문자로 된 Indent가 있어야 한다. - -2. 내장 매크로(Pre-defined Macro) - Variables Used by Implicit Rules - * CC : 컴파일러 - * CFLAGS : 컴파일 옵션 - * OBJS : 중간 산물 Object 파일 목록 - * TARGET : 빌드 대상(실행 파일) 이름 - * LDFLAGS : 링커 옵션 - * LDLIBS : 링크 라이브러리 - -3. 내장 매크로(Internal Macro) - Automatic variables - * $@ : 현재의 목표 (Target) 파일명 - * $? : 현재의 목표파일(Target)보다 더 최근에 갱신된 의존 파일 명단 - * $* : 현재의 목표파일(Target)보다 더 최근에 갱신된 현재 의존 파일 명단(확장자를 제외한) - * $< : 의존 파일(전제 조건) 중 첫번째 파일명 - * $^ : 현재 모든 의존 파일들의 명단 - - -## Makefile 작성 실습 과정 -1. Makefile 형식 -  -2. Dummy Target(Label) & Dependency Check -  -3. 매크로(Macro, Variable)의 이용 -  -4. 내장 매크로(Internal Macro)의 이용 -  -5. 내장 매크로(Pre-definced Macro)의 이용 -  -6. 확장자규칙(Suffix Rules)의 이용 & 확장자(Suffix)의 치환 이용 -  -7. 디폴트 확장자규칙(Default Suffix Rules)의 이용 -  -8. make clean 후 make - * make clean 했을 때 설정한 파일들이 지워지고 make를 했을 때 설정 파일들을 컴파일한다. -  \ No newline at end of file diff --git a/three_files/func.c b/three_files/func.c deleted file mode 100644 index 0643c37..0000000 --- a/three_files/func.c +++ /dev/null @@ -1,15 +0,0 @@ -//func.c file - -#include <stdio.h> -#include "func.h" - -int func_name_or_id() -{ -#ifdef PRINT_ID - printf("ID : 201723273\n"); - return 0; -#else - printf("Name : JieunYoon\n"); - return 1; -#endif -} diff --git a/three_files/func.h b/three_files/func.h deleted file mode 100644 index 4ede03d..0000000 --- a/three_files/func.h +++ /dev/null @@ -1,3 +0,0 @@ -//func.h - -extern int func_name_or_id(); diff --git a/three_files/main b/three_files/main deleted file mode 100644 index 608853bc905cbe750ebc9a6a001215d8baa77cc1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8368 zcmb<-^>JfjWMqH=W(GS35YK=WBH{p{7z!kz3<d@U2L=lUP6h`CSq2#fHU<U;7O)sZ z9;O~f{{R`rz`y{bIUvdyn4$VCm>>e^v<yU;0Y*cO0lN+AG^h$xssd^OjAmd^04o6L z2f1|zFPO`)gBKzWqa&d1NPyBXeIPDK-wCL`6Ht9H`UA*d1_lNg4YeK|CZKQ$0U5x+ zz<^G>K%Bt<qd{sxLIF=pQb24Db`Xz&0iA}ahtVLlAeDhnOHx4Y1hI+10#HRkQ2TI& ziwD&GFdFJz2K}7OBr_BJoD|)h%)HVH-3kjcT{9EC;(R?Lu-`%EgVehFg@SDY#W&O_ zu)GKZ12_$U<Rd%1)>|%{yQ!zJXlk(@8*_-@y*(hkFbp<;NWzu@7IUZ?xEUB2giwXR zJb4`AkvPoBz#$IuuM*fqG$JQ6DH#+jW()<TCB+Q!@yQj5@oAZPi8+~7sSNS)Ao=*> zlEk8t_}s+IJO+0kPbcSiBRwNMQ-*lY5a0Ne)S}e%%;J*Nq7Yx_ocz4hki?`Mkk0hn z{5+`6c!*N03PJ8+Vt|A_69Xd{GBAML3z8|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am-yko-^uxv%c7Pnk zz`)=E(u9Oz_QL2_(C~xlhqo7@7C<Su2{3&y0noewNDQVQ*6$I3Y6Qu_)PiV`TR}7o ze}&p_026@HF#WLhAXFGW9t1N7M8nb^Obv*3fZ8ts4LDFeqk|>?gVHz5?I3+H904jU i7#J8N(F_OK2U7#01(D(&#E0QRXu<OjCIF?;^#cIXXfNIX diff --git a/three_files/main.c b/three_files/main.c deleted file mode 100644 index cbf27c6..0000000 --- a/three_files/main.c +++ /dev/null @@ -1,11 +0,0 @@ -// main.c - -#include <stdio.h> -#include "func.h" - - -int main() -{ - func_name_or_id(); - -} diff --git a/three_files/make/make1 b/three_files/make/make1 deleted file mode 100644 index f7de64a..0000000 --- a/three_files/make/make1 +++ /dev/null @@ -1,8 +0,0 @@ -test : func.o main.o - gcc -o test func.o main.o - -func.o : func.c func.h - gcc -c func.c - -main.o : main.c func.h - gcc -c main.c diff --git a/three_files/make/make2 b/three_files/make/make2 deleted file mode 100644 index 8953672..0000000 --- a/three_files/make/make2 +++ /dev/null @@ -1,16 +0,0 @@ -test : func.o main.o - gcc -o test func.o main.o - -func.o : func.c - gcc -c func.c - -main.o : main.c - gcc -c main.c - -#dummy target -clean : - -rm func.o main.o - rm test - -dep : - gccmakedep func.c main.c diff --git a/three_files/make/make3 b/three_files/make/make3 deleted file mode 100644 index e8ac008..0000000 --- a/three_files/make/make3 +++ /dev/null @@ -1,18 +0,0 @@ -OBJS := func.o main.o - -test : $(OBJS) - gcc -o test $(OBJS) - -func.o : func.c - gcc -c func.c - -main.o : main.c - gcc -c main.c - -#dummy target -clean : - -rm $(OBJS) - rm test - -dep : - gccmakedep func.c main.c diff --git a/three_files/make/make4 b/three_files/make/make4 deleted file mode 100644 index d8bf175..0000000 --- a/three_files/make/make4 +++ /dev/null @@ -1,18 +0,0 @@ -OBJS := func.o main.o - -test : $(OBJS) - gcc -o $@ $^ - -func.o : func.c - gcc -c $? - -main.o : main.c - gcc -c $*.c - -#dummy target -clean : - -rm $(OBJS) - rm test - -dep : - gccmakedep func.c main.c diff --git a/three_files/make/make5 b/three_files/make/make5 deleted file mode 100644 index 617e1ac..0000000 --- a/three_files/make/make5 +++ /dev/null @@ -1,20 +0,0 @@ -OBJS := func.o main.o -CC := gcc -CFLAGS = -c -Wall -g - -test : $(OBJS) - $(CC) -o $@ $^ - -func.o : func.c - $(CC) $(CFLAGS) $? - -main.o : main.c - $(CC) $(CFLAGS) $*.c - -#dummy target -clean : - -rm $(OBJS) - rm test - -dep : - gccmakedep func.c main.c diff --git a/three_files/make/make6 b/three_files/make/make6 deleted file mode 100644 index 1fcedbd..0000000 --- a/three_files/make/make6 +++ /dev/null @@ -1,18 +0,0 @@ -SRCS := func.c main.c -OBJS := $(SRCS:.c=.o) -CC := gcc -CFLAGS = -c -Wall -g - -test : $(OBJS) - $(CC) -o $@ $^ - -.c.o : - $(CC) $(CFLAGS) $< - -#dummy target -clean : - -rm $(OBJS) - rm test - -dep : - gccmakedep $(SRCS) diff --git a/three_files/make/make7 b/three_files/make/make7 deleted file mode 100644 index 6a9c6a4..0000000 --- a/three_files/make/make7 +++ /dev/null @@ -1,15 +0,0 @@ -SRCS := func.c main.c -OBJS := $(SRCS:.c=.o) -CC := gcc -CFLAGS = -Wall -g - -test : $(OBJS) - $(CC) -o $@ $^ - -#dummy target -clean : - -rm $(OBJS) - rm test - -dep : - gccmakedep $(SRCS) -- GitLab