Skip to content

Commit

Permalink
Committing to complete merge
Browse files Browse the repository at this point in the history
  • Loading branch information
seanchen1991 committed Oct 25, 2018
2 parents ff47fe0 + 5709a94 commit e1e798a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 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
6 changes: 3 additions & 3 deletions src/file.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _FILE_H_
#define _FILE_H_
#ifndef _FILELS_H_ // This was just _FILE_H_, but that interfered with Cygwin
#define _FILELS_H_

struct file_data {
int size;
Expand All @@ -9,4 +9,4 @@ struct file_data {
extern struct file_data *file_load(char *filename);
extern void file_free(struct file_data *filedata);

#endif
#endif

0 comments on commit e1e798a

Please sign in to comment.