Add touch
This commit is contained in:
parent
0c5f04cf56
commit
147b52eed9
|
@ -1,5 +1,6 @@
|
||||||
*
|
*
|
||||||
!.gitignore
|
!.gitignore
|
||||||
!cat.c
|
!cat.c
|
||||||
|
!touch.c
|
||||||
!yes.c
|
!yes.c
|
||||||
!Makefile
|
!Makefile
|
||||||
|
|
|
@ -2,10 +2,11 @@ CC = gcc
|
||||||
CFLAGS= -Wall -Wextra
|
CFLAGS= -Wall -Wextra
|
||||||
LFLAGS=
|
LFLAGS=
|
||||||
|
|
||||||
all: cat yes
|
all: cat touch yes
|
||||||
|
|
||||||
main: $(OBJFILES)
|
main: $(OBJFILES)
|
||||||
$(CC) cat.c -o cat
|
$(CC) cat.c -o cat
|
||||||
|
$(CC) touch.c -o touch
|
||||||
$(CC) yes.c -o yes
|
$(CC) yes.c -o yes
|
||||||
|
|
||||||
test: main
|
test: main
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]){
|
||||||
|
for (int i = 1; i < argc; i++) {
|
||||||
|
FILE *file = fopen(argv[i], "w");
|
||||||
|
fclose(file);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue