aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: a03c3b0b9222c645d967f077cfa8e0f9074c4e79 (plain)
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
B = build/default/

C = c/main.c
PL = pl/cfg.pl pl/episode_data.pl pl/local_episodes.pl pl/track_episodes.pl
OBJ = $(B)common.obj $(B)datalistview.obj $(B)episodelistview.obj $(B)listview.obj $(B)resource.obj

CC = swipl-ld
CFLAGS += -O -ld-options,-mwindows
CFLAGS += -DUNICODE -D_UNICODE
LDFLAGS += -lcomctl32 -luxtheme

all: $(B)EpisodeBrowser.exe

$(B)EpisodeBrowser.exe: $(C) $(OBJ) $(PL) c/defs.h Makefile
	$(CC) -v $(CFLAGS) $(LDFLAGS) -goal true -o $@ $(C) $(OBJ) $(PL)

$(B)resource.obj: c/resource.h c/resource.rc c/application.manifest
	windres -i c/resource.rc -o $(B)resource.obj

$(B)%.obj: c/%.c c/defs.h
	$(CC) -c $(CFLAGS) -o $@ $<

TAGS: c/*.c c/*.h pl/*.pl
	etags c/*.c c/*.h -lprolog pl/*.pl

clean:
	rm -fr $(B)EpisodeBrowser.exe $(B)*.obj