|
|
@ -1,13 +1,12 @@
|
|
|
|
EXEC_FILE=main
|
|
|
|
EXEC_FILE=main
|
|
|
|
TARGETS=$(EXEC_FILE).o message.o user.o message_helpers.o file_helpers.o
|
|
|
|
TARGETS=$(EXEC_FILE).o message.o user.o message_helpers.o file_helpers.o
|
|
|
|
|
|
|
|
CFLAGS=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
all: $(EXEC_FILE)
|
|
|
|
all: $(EXEC_FILE)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(EXEC_FILE): $(TARGETS)
|
|
|
|
$(EXEC_FILE): $(TARGETS)
|
|
|
|
gcc -o $(EXEC_FILE) $^ -leasysock
|
|
|
|
gcc $(CFLAGS) -o $(EXEC_FILE) $^ -leasysock
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(EXEC_FILE).o: $(EXEC_FILE).c
|
|
|
|
$(EXEC_FILE).o: $(EXEC_FILE).c
|
|
|
@ -15,12 +14,18 @@ message.o: message.c
|
|
|
|
user.o: user.c
|
|
|
|
user.o: user.c
|
|
|
|
message_helpers.o: message_helpers.c
|
|
|
|
message_helpers.o: message_helpers.c
|
|
|
|
file_helpers.o: file_helpers.c
|
|
|
|
file_helpers.o: file_helpers.c
|
|
|
|
|
|
|
|
|
|
|
|
$(TARGETS):
|
|
|
|
$(TARGETS):
|
|
|
|
gcc -c -o $@ $^
|
|
|
|
gcc $(CFLAGS) -c -o $@ $^
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: debug
|
|
|
|
|
|
|
|
debug: CFLAGS+=-g
|
|
|
|
|
|
|
|
debug: $(EXEC_FILE)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: allwarn
|
|
|
|
|
|
|
|
allwarn: CFLAGS+=-Wall -Wextra -pedantic
|
|
|
|
|
|
|
|
allwarn: $(EXEC_FILE)
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
clean:
|
|
|
|