aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 70f88122a9c28e889ea6a7bf628df5063cb0938b (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
CC      = gcc
WINDRES = windres
RUNNER  =

CFLAGS  = -mwindows -municode
LIBS    = -lgdi32 -luser32 -lshell32 -ladvapi32 -lm

all: ColorPicker.exe

ColorPicker-noico.exe: color-picker.c
	$(CC) $< -o $@ $(CFLAGS) $(LIBS)

rainbow.ico: ColorPicker-noico.exe
	$(RUNNER) ./ColorPicker-noico.exe --make-ico

icon.res: icon.rc rainbow.ico
	$(WINDRES) $< -O coff -o $@

ColorPicker.exe: color-picker.c icon.res
	$(CC) color-picker.c icon.res -o $@ $(CFLAGS) $(LIBS)

clean:
	rm -f ColorPicker-noico.exe rainbow.ico icon.res ColorPicker.exe

.PHONY: all clean