Initial Commit
[Projects.git] / server / Makefile
blobf17f1bb09e7e0e76795be32ce034a4483ffadfb6
1 EXECUTABLE := server
2 BUILD := build
3 INCLUDES := /usr/include/dundancy.h
4 SOURCES := source
5 CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
6 HFILES := source/dundancy.h
7 OFILES := /usr/lib/dundancy.o $(CFILES:.c=.o)
8 COMPILER := gcc
9 OPTIONS := -g
11 all: run
13 $(BUILD):
14 @mkdir -p $@
16 %.o: %.c
17 @echo $(notdir $<)
18 @$(COMPILER) $(OPTIONS) -c $< -o $@
20 debug: $(EXECUTABLE)
21 @gdb --eval-command=run $(TARGET)
23 clean: $(BUILD)
24 @rm -fr $<
26 run: $(EXECUTABLE)
27 @./$<
29 $(EXECUTABLE): $(OFILES)
30 @echo Compiling...
31 $(COMPILER) $(OPTIONS) -o $@ $<l