Skip to content
This repository was archived by the owner on Nov 17, 2022. It is now read-only.

Commit b6e1701

Browse files
committed
Added basic project structure
1 parent b9486f4 commit b6e1701

File tree

5 files changed

+48
-0
lines changed

5 files changed

+48
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@
2626
*.exe
2727
*.out
2828
*.app
29+
30+
# Ignore Mac specific files
31+
.DS_Store

Makefile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
CC := g++ # This is the main compiler
2+
SRCDIR := src
3+
BUILDDIR := build
4+
TARGET := bin/orq
5+
6+
SRCEXT := cpp
7+
SOURCES := $(shell find $(SRCDIR) -type f -name *.$(SRCEXT))
8+
OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.o))
9+
CFLAGS := -g -Wall
10+
LIB :=
11+
INC := -I include
12+
13+
$(TARGET): $(OBJECTS)
14+
@echo " Linking..."
15+
@echo " $(CC) $^ -o $(TARGET) $(LIB)"; $(CC) $^ -o $(TARGET) $(LIB)
16+
17+
$(BUILDDIR)/%.o: $(SRCDIR)/%.$(SRCEXT)
18+
@mkdir -p $(BUILDDIR)
19+
@echo " $(CC) $(CFLAGS) $(INC) -c -o $@ $<"; $(CC) $(CFLAGS) $(INC) -c -o $@ $<
20+
21+
clean:
22+
@echo " Cleaning...";
23+
@echo " $(RM) -r $(BUILDDIR) $(TARGET)"; $(RM) -r $(BUILDDIR) $(TARGET)
24+
25+
# Tests
26+
tester:
27+
$(CC) $(CFLAGS) test/tester.cpp $(INC) $(LIB) -o bin/tester
28+
29+
# Spikes
30+
ticket:
31+
$(CC) $(CFLAGS) spikes/ticket.cpp $(INC) $(LIB) -o bin/ticket
32+
33+
.PHONY: clean

bin/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Ignore everything in this directory
2+
*
3+
# Except this file
4+
!.gitignore

build/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Ignore everything in this directory
2+
*
3+
# Except this file
4+
!.gitignore

lib/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Ignore everything in this directory
2+
*
3+
# Except this file
4+
!.gitignore

0 commit comments

Comments
 (0)