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 e3bff0edc383637e61bfc39303434b243cacd415..87bd6b63fce3a697952614201b79472e5bf49198 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 461779f965f30f2fbe3f871aa60f80bd5dd361a9..0000000000000000000000000000000000000000 --- 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 abec2faa5bfe9220a9a4925dfb775a91bf62863c..0000000000000000000000000000000000000000 --- 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 dd67f9ae3a221ea95e0bb4fc3ac68ff61518ac96..0000000000000000000000000000000000000000 --- 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 aefbe1fc4783689d363b362c1513c149d874ede5..0000000000000000000000000000000000000000 --- 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 08839f6bb296e888d311d8ea2f35f7ff82dd3f2d..0000000000000000000000000000000000000000 --- 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 4d6b988819ba436af54cea6e49d6f871cea244a9..0000000000000000000000000000000000000000 --- 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 2864cf698a16205b3d5b1292ca92b51c6c7752fd..0000000000000000000000000000000000000000 --- 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 5acd122c2a122cb0b374743c907a702cac22cd2a..0000000000000000000000000000000000000000 --- 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 6a9c6a4daaca15a54b06baf0b0cf41fc4516bdd1..0000000000000000000000000000000000000000 --- 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 97eee27be0e1d681242773654fa1f41dc74aa9a0..0000000000000000000000000000000000000000 --- 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 0643c37c8d67cdd5e5f921a148f33e530daa5038..0000000000000000000000000000000000000000 --- 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 4ede03d38a3342e9865c0c3c790a3a518f997735..0000000000000000000000000000000000000000 --- 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 Binary files a/three_files/main and /dev/null differ diff --git a/three_files/main.c b/three_files/main.c deleted file mode 100644 index cbf27c637ff243b61aca178f18c1a8770fcbbe49..0000000000000000000000000000000000000000 --- 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 f7de64ab845944ce62b5c674b1d8708e1d311f47..0000000000000000000000000000000000000000 --- 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 8953672ae31aacfc0379baddc47b373b128e7571..0000000000000000000000000000000000000000 --- 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 e8ac008c85f869ce0f230e1f641b2c5334ceb3d7..0000000000000000000000000000000000000000 --- 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 d8bf175ec28f7a8a6530ed1cb539de588c198878..0000000000000000000000000000000000000000 --- 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 617e1ac1d1f56987d361a5eaa808342a4f9e2f4a..0000000000000000000000000000000000000000 --- 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 1fcedbd9dd8f81e793765e4b1f3b72cecc3a88af..0000000000000000000000000000000000000000 --- 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 6a9c6a4daaca15a54b06baf0b0cf41fc4516bdd1..0000000000000000000000000000000000000000 --- 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)