Skip to content

Commit

Permalink
Makefile cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Beej Jorgensen committed Oct 25, 2018
1 parent 0e2e0c4 commit 73e70fd
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
CFLAGS=-std=c99 -Wall -Wextra
CC=gcc
CFLAGS=-Wall -Wextra

OBJS=server.o net.o file.o mime.o cache.o hashtable.o llist.o

all: server

server: $(OBJS)
gcc -Wall -Wextra -g -o $@ $^
gcc -o $@ $^

net.o: net.c net.h
gcc -Wall -Wextra -c $<

server.o: server.c net.h
gcc -Wall -Wextra -c $<

file.o: file.c file.h
gcc -Wall -Wextra -c $<

mime.o: mime.c mime.h
gcc -Wall -Wextra -c $<

cache.o: cache.c cache.h
gcc -Wall -Wextra -c $<

hashtable.o: hashtable.c hashtable.h
gcc -Wall -Wextra -c $<

llist.o: llist.c llist.h
gcc -Wall -Wextra -c $<

.PHONY: clean

clean:
rm -f $(OBJS)
Expand All @@ -47,4 +41,4 @@ test:
tests: clean $(TESTS)
sh ./cache_tests/runtests.sh

.PHONY: tests
.PHONY: all, clean, tests

0 comments on commit 73e70fd

Please sign in to comment.