Skip to content

Commit cde3a9b

Browse files
committed
Organize repository
Put source code in `src/` and build assets to `bin/`
1 parent bf2166c commit cde3a9b

File tree

12 files changed

+17
-15
lines changed

12 files changed

+17
-15
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,5 @@ Mkfile.old
5252
dkms.conf
5353

5454
# Built assets
55-
fetchfetch
55+
bin/*
56+
!bin/.gitkeep

Makefile

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
1-
fetchfetch: art.o args.o stats.o version.o fetchfetch.c
2-
$(CC) -o fetchfetch art.o args.o stats.o version.o fetchfetch.c
1+
bin/fetchfetch: bin/art.o bin/args.o bin/stats.o bin/version.o src/fetchfetch.c
2+
$(CC) -o bin/fetchfetch bin/art.o bin/args.o bin/stats.o bin/version.o src/fetchfetch.c
33

4-
args.o: args.c args.h
5-
$(CC) -c -o args.o args.c
64

7-
art.o: art.c art.h
8-
$(CC) -c -o art.o art.c
5+
bin/args.o: src/args.c src/args.h
6+
$(CC) -c -o bin/args.o src/args.c
97

10-
stats.o: stats.c stats.h version.c version.h
11-
$(CC) -c -o stats.o stats.c
8+
bin/art.o: src/art.c src/art.h
9+
$(CC) -c -o bin/art.o src/art.c
1210

13-
version.o: version.c version.h
14-
$(CC) -c -o version.o version.c
11+
bin/stats.o: src/stats.c src/stats.h src/version.c src/version.h
12+
$(CC) -c -o bin/stats.o src/stats.c
13+
14+
bin/version.o: src/version.c src/version.h
15+
$(CC) -c -o bin/version.o src/version.c
1516

1617
.PHONY: format
1718
format:
18-
clang-format -i *.c *.h
19+
clang-format -i src/*
1920

2021
.PHONY: run
21-
run: fetchfetch
22-
./fetchfetch
22+
run: bin/fetchfetch
23+
./bin/fetchfetch
2324

2425
.PHONY: install
2526
install: fetchfetch
26-
cp ./fetchfetch /usr/local/bin/fetchfetch
27+
cp ./bin/fetchfetch /usr/local/bin/fetchfetch

bin/.gitkeep

Whitespace-only changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)