-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
51 lines (36 loc) · 1009 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
BINARY := ./build/NanoSVGTranslator
OBJS := shared/TranslatorSettings.o \
shared/TranslatorWindow.o \
shared/BaseTranslator.o \
shared/StreamBuffer.o \
SVGTranslator.o \
SVGLoader.o \
ConfigView.o \
SVGTranslatorApp.o
OBJDIR := build
RDEFS := ./res/NanoSVGTranslator.rdef
RSRCS := ./build/NanoSVGTranslator.rsrc
OBJS := $(addprefix $(OBJDIR)/,$(OBJS))
CC := g++
LD := $(CC)
LIBS := -lbe -ltranslation -lroot
CFLAGS := -w -g -I./src -I./src/shared -I./nanosvg
LDFLAGS := -g
.PHONY : clean build install
default : build
build : $(BINARY)
$(BINARY) : $(OBJDIR) $(OBJS) $(RSRCS)
$(LD) $(CFLAGS) $(OBJS) -o $(BINARY) $(LDFLAGS) $(LIBS)
strip $(BINARY)
xres -o $(BINARY) $(RSRCS)
mimeset -f $(BINARY)
clean:
rm -rf $(OBJDIR)
build/%.o : src/%.cpp
@mkdir -p $(OBJDIR)/shared
$(CC) $(CFLAGS) -c $< -o $@
build/%.rsrc : res/%.rdef
rc -o $@ $<
install:
mkdir -p /boot/home/config/non-packaged/add-ons/Translators
cp $(BINARY) /boot/home/config/non-packaged/add-ons/Translators