-
Notifications
You must be signed in to change notification settings - Fork 2
/
makefile
33 lines (23 loc) · 1002 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
IDIR =./include
INDIR =./lib
CC=g++
CFLAGS=-I$(IDIR) -I$(INDIR)
GTKFLAG = `pkg-config gtkmm-3.0 --cflags --libs`
ODIR =./bin
SDIR =./src
BDIR =./build
_DEPS = display.h
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))
_OBJ = display.o main.o display.o
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
_BUILDS = main
BUILDS = $(patsubst %,$(BDIR)/%,$(_BUILDS))
MKDIR = mkdir -p
OUT_DIR = bin build
$(ODIR)/%.o: $(SDIR)/%.cpp $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS) $(GTKFLAG)
all: directories $(BUILDS)
directories:
$(MKDIR) $(OUT_DIR)
$(BDIR)/main: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(GTKFLAG)