Skip to content

Commit a304212

Browse files
committed
Restructure project for better organization.
1 parent 2e55cfa commit a304212

File tree

12 files changed

+8
-5
lines changed

12 files changed

+8
-5
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
/bot
2-
/*.o
2+
/obj/*.o

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
CC=g++
2-
DEFAULT_CFLAGS:=-std=c++11 -g -Wall -Wextra -pedantic
2+
DEFAULT_CFLAGS:=-I include/ -std=c++11 -g -Wall -Wextra -pedantic
33
CFLAGS?=
44
CFLAGS += $(DEFAULT_CFLAGS)
5-
OBJECTS=$(patsubst %.cpp,%.o,$(wildcard *.cpp))
5+
SDIR=src
6+
IDIR=include
7+
ODIR=obj
8+
OBJECTS=$(patsubst $(SDIR)/%.cpp,$(ODIR)/%.o,$(wildcard $(SDIR)/*.cpp))
69
OUT=bot
710

811
all: bot
912

1013
bot: $(OBJECTS)
1114
$(CC) -o $(OUT) $^ $(CFLAGS)
1215

13-
%.o: %.cpp
14-
$(CC) -c $< $(CFLAGS)
16+
$(ODIR)/%.o: $(SDIR)/%.cpp
17+
$(CC) -c $< -o $@ $(CFLAGS)
1518

1619
clean:
1720
rm -f $(OBJECTS)
File renamed without changes.
File renamed without changes.

irc.h renamed to include/irc.h

File renamed without changes.
File renamed without changes.

obj/.placeholder

Whitespace-only changes.
File renamed without changes.
File renamed without changes.

irc.cpp renamed to src/irc.cpp

File renamed without changes.

0 commit comments

Comments
 (0)