-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmakefile
52 lines (38 loc) · 993 Bytes
/
makefile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#--------------------------------
# finddupe makefile for Mingw
# Needs mingw-w64 for Unicode https://sourceforge.net/p/mingw-w64/wiki2/Unicode%20apps/
#--------------------------------
# comment out to disable
Unicode=1
#Debug=1
CC=gcc
CFLAGS=-O3 -Wall
LINKER=gcc
LDFLAGS=
ifdef Unicode
CFLAGS += -D_UNICODE -DUNICODE
LDFLAGS += -municode
endif
ifdef Debug
CFLAGS += -g
LDFLAGS += -g
endif
# needs a different DevKit for 64-bit build
all: finddupe.exe #finddupe64.exe
OBJ =
OBJECTS_FINDDUPE = $(OBJ)finddupe.o \
$(OBJ)myglob.o \
OBJECTS_FINDDUPE64 = $(OBJECTS_FINDDUPE:.o=.o64)
%.o : %.c
$(CC) -c $(CFLAGS) -o $@ $<
%.o64 : %.c
$(CC) -c $(CFLAGS) -m64 -o $@ $<
finddupe.exe: $(OBJECTS_FINDDUPE)
$(LINKER) $(LDFLAGS) -o $@ $(OBJECTS_FINDDUPE)
finddupe64.exe: $(OBJECTS_FINDDUPE64)
$(LINKER) $(LDFLAGS) -m64 -o $@ $(OBJECTS_FINDDUPE64)
# for testing only
myglob.exe: myglob.c
$(CC) $(CFLAGS) $(LDFLAGS) -DDEBUGGING -o $@ $<
clean:
rm *.o *.o64 *.exe