xbot/Makefile

41 lines
1.1 KiB
Makefile
Raw Permalink Normal View History

2015-03-24 10:12:35 +00:00
CC=gcc
CFLAGS=-g -std=gnu99 -c -lconfig -ldl -I./lib
2024-03-14 08:20:38 +00:00
BINFLAGS=-g -rdynamic -ldl -lconfig
2015-03-24 10:12:35 +00:00
SRC=./src
OBJ=./build
OBJECTS=$(OBJ)/*.o
EXEC=xbot
2024-02-13 07:22:10 +00:00
#MODS_DIR := $(filter-out $(wildcard mods/*.so), $(wildcard mods/*))
MODS_DIR := $(filter-out $(wildcard mods/*.so) $(wildcard mods/*.dll) $(wildcard mods/*.bat) $(wildcard mods/*.obj) $(wildcard mods/*.lib) $(wildcard mods/*.exp), $(wildcard mods/*))
.PHONY: mods $(MODS_DIR)
2015-04-07 16:44:37 +00:00
2015-03-24 10:12:35 +00:00
main:
@rm -rf build
@mkdir build
2015-04-07 18:18:24 +00:00
$(CC) $(CFLAGS) $(SRC)/config.c -o $(OBJ)/config.o
2015-03-24 17:48:11 +00:00
$(CC) $(CFLAGS) $(SRC)/main.c -o $(OBJ)/main.o
$(CC) $(CFLAGS) $(SRC)/irc.c -o $(OBJ)/irc.o
$(CC) $(CFLAGS) $(SRC)/util.c -o $(OBJ)/util.o
$(CC) $(CFLAGS) $(SRC)/events.c -o $(OBJ)/events.o
$(CC) $(CFLAGS) $(SRC)/module.c -o $(OBJ)/module.o
2024-02-16 21:28:11 +00:00
$(CC) $(CFLAGS) $(SRC)/channel.c -o $(OBJ)/channel.o
2024-02-21 14:24:49 +00:00
$(CC) $(CFLAGS) $(SRC)/timers.c -o $(OBJ)/timers.o
2024-03-06 02:12:10 +00:00
$(CC) $(CFLAGS) $(SRC)/db.c -o $(OBJ)/db.o
2024-03-09 08:40:06 +00:00
$(CC) $(CFLAGS) $(SRC)/logger.c -o $(OBJ)/logger.o
2024-03-06 02:12:10 +00:00
2015-03-24 10:12:35 +00:00
$(CC) -o $(EXEC) $(OBJECTS) $(BINFLAGS)
@echo "All Done!"
2024-02-13 07:22:10 +00:00
mods: $(MODS_DIR)
$(MODS_DIR):
$(MAKE) -C $@
2015-04-07 16:44:37 +00:00
2024-02-27 07:16:58 +00:00
all: main mods
2015-03-24 10:12:35 +00:00
clean:
2024-02-13 07:22:10 +00:00
@rm -rf build $(EXEC)
@rm -rf mods/*.so