mk
This commit is contained in:
parent
cafbdc3ea6
commit
7eed71d9b2
8
Makefile
8
Makefile
@ -1,11 +1,11 @@
|
|||||||
C_SOURCES:=$(wildcard src/*.c)
|
C_SOURCES:=$(wildcard coreutils/*.c)
|
||||||
C_TARGETS:=$(patsubst src/%.c,bin/%,$(C_SOURCES))
|
C_TARGETS:=$(patsubst coreutils/%.c,bin/%,$(C_SOURCES))
|
||||||
TARGETS:=$(C_TARGETS) $(S_TARGETS)
|
TARGETS:=$(C_TARGETS)
|
||||||
|
|
||||||
CFLAGS:=-s -Os -pedantic -Wall -Wextra
|
CFLAGS:=-s -Os -pedantic -Wall -Wextra
|
||||||
all: bin $(TARGETS)
|
all: bin $(TARGETS)
|
||||||
|
|
||||||
bin/%: src/%.c
|
bin/%: coreutils/%.c
|
||||||
$(CC) $(CFLAGS) -o $@ $<
|
$(CC) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@ -34,10 +34,11 @@ int list(const char *path, int flag, int label) {
|
|||||||
if (ep->d_name[0] == '.' && !flag)
|
if (ep->d_name[0] == '.' && !flag)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
puts(ep->d_name);
|
printf("%s ", ep->d_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
closedir(dp);
|
closedir(dp);
|
||||||
|
printf("\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user