aboutsummaryrefslogtreecommitdiffstats
path: root/icepack/Makefile
blob: 2578fe0d98ed3d47c7cee26f60a8ab12fe8db40f (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
28
29
30
31
32
33
34
35
36
37
include ../config.mk
MXEGCC = /usr/local/src/mxe/usr/bin/i686-pc-mingw32-gcc

ifeq ($(STATIC),1)
LDFLAGS += -static
endif

all: icepack$(EXE) iceunpack$(EXE)

icepack$(EXE): icepack.o
	$(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS)

iceunpack: icepack
	ln -sf icepack iceunpack

iceunpack.exe:
	# no iceunpack.exe, use icepack -u

install: all
	mkdir -p $(DESTDIR)$(PREFIX)/bin
	cp icepack $(DESTDIR)$(PREFIX)/bin/icepack
	ln -sf icepack $(DESTDIR)$(PREFIX)/bin/iceunpack

uninstall:
	rm -f $(DESTDIR)$(PREFIX)/bin/icepack
	rm -f $(DESTDIR)$(PREFIX)/bin/iceunpack

clean:
	rm -f icepack
	rm -f iceunpack
	rm -f icepack.exe
	rm -f *.o *.d

-include *.d

.PHONY: all install uninstall clean