-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
64 lines (47 loc) · 1.01 KB
/
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
52
53
54
55
56
57
58
59
60
61
62
BINARY := DjVuViewer
OBJS := MainApp.o \
MainWindow.o \
AboutWindow.o \
Settings.o \
PicButton.o \
Theme.o \
Label.o \
Language.o \
ConfigureWindow.o \
IconMenuItem.o \
IconListItem.o \
ToolsContainer.o \
ShowImageView.o \
Filter.o \
LoadDjVu.o \
ThumbListItem.o \
GoToWindow.o
OBJDIR := Build
RDEF := Resource/resource.rdef
ifneq ($(shell uname -m),x86_64)
OBJS := $(OBJS) Render.o
endif
OBJS := $(addprefix $(OBJDIR)/,$(OBJS))
CC := g++
ASM := yasm
LD := $(CC)
LIBS := -lbe -ltranslation -ltracker -ldjvulibre
CFLAGS := -O3 -I./Includes
LDFLAGS :=
.PHONY : clean Build
default : Build
Build : $(BINARY)
$(BINARY) : $(OBJDIR) $(OBJS)
$(LD) $(CFLAGS) $(OBJS) -o $(BINARY) $(LDFLAGS) $(LIBS)
rc -o $(OBJDIR)/resource.rsrc $(RDEF)
xres -o $(BINARY) $(OBJDIR)/resource.rsrc
mimeset -f $(BINARY)
clean:
rm -rf $(OBJDIR)/*.*
rm $(BINARY)
Build/%.o : Src/%.cpp
@mkdir -p $(OBJDIR)
$(CC) $(CFLAGS) -c $< -o $@
Build/%.o : Src/%.asm
@mkdir -p $(OBJDIR)
$(ASM) -f elf $< -o $@