Skip to content

Commit cf1e26f

Browse files
authored
Merge pull request #15 from E5ten/makefile
Makefile: split compile and link steps
2 parents f03cc84 + 14b502c commit cf1e26f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ CC ?= gcc
55

66
all: kirc
77

8-
kfc: kirc.c Makefile
9-
$(CC) -O3 $(CFLAGS) -o $@ $< -lX11 $(LDFLAGS)
8+
kirc: kirc.o Makefile
9+
$(CC) $(CFLAGS) -o $@ $@.o -lX11 $(LDFLAGS)
10+
11+
.c.o:
12+
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
1013

1114
install: all
1215
install -Dm755 kirc $(DESTDIR)$(BINDIR)/kirc

0 commit comments

Comments
 (0)