aboutsummaryrefslogtreecommitdiffstats
path: root/icepack/Makefile
blob: 3e8c774216e382d1b7ab1b0bc73cd4c65bf4dca6 (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$(EXE): icepack$(EXE)
	ln -sf icepack$(EXE) iceunpack$(EXE)

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

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

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

clean:
	rm -f icepack$(EXE)
	rm -f iceunpack$(EXE)
	rm -f icepack.exe
	rm -f *.o *.d

-include *.d

.PHONY: all install uninstall clean