summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 6296e9b0d4f637132d9ae6f8d540e19b780822ad (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
# cross compilation
CC = $(CROSS)gcc
LD = $(CROSS)ld
AR = $(CROSS)ar
RANLIB = $(CROSS)ranlib
STRIP = $(CROSS)strip

# flags
CFLAGS = -g -O2 -Wall
LIBS = -lcrypto

# mingw windows compilation
ifeq ($(findstring mingw,$(shell $(CC) --version)), mingw)
CFLAGS += -mms-bitfields
EXEEXT = .exe
endif

TARGET = wadtool$(EXEEXT)
OBJECTS = main.o types.o patcher.o wii_tmd.o wii_wad.o wii_tik.o crypto.o ucs.o
HEADERS = types.h patcher.h wii_tmd.h wii_wad.h wii_imet.h wii_tik.h crypto.h ucs.h

$(TARGET): $(OBJECTS) $(HEADERS)
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)

clean:
	rm -rf $(OBJECTS) $(TARGET)