-
Notifications
You must be signed in to change notification settings - Fork 709
/
GNUmakefile
73 lines (61 loc) · 1.32 KB
/
GNUmakefile
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
SRCS = \
src/dbg.c \
src/lfn.c \
src/lfnmisc.c \
src/numfmt.c \
src/Resize.c \
src/suggest.c \
src/tbar.c \
src/treectl.c \
src/wfassoc.c \
src/wfchgnot.c \
src/wfcomman.c \
src/wfcopy.c \
src/wfdir.c \
src/wfdirrd.c \
src/wfdirsrc.c \
src/wfdlgs.c \
src/wfdlgs2.c \
src/wfdlgs3.c \
src/wfdos.c \
src/wfdrives.c \
src/wfdrop.c \
src/wfext.c \
src/wffile.c \
src/wfinfo.c \
src/wfinit.c \
src/wfmem.c \
src/wfloc.c \
src/wfprint.c \
src/wfsearch.c \
src/wftree.c \
src/wfutil.c \
src/winfile.c \
src/wnetcaps.c
OBJS = $(subst .c,.o,$(SRCS)) src/wfgoto.o src/res.o
CFLAGS = -DUNICODE -DFASTMOVE -DSTRSAFE_NO_DEPRECATE -DWINVER=0x0600
LDLIBS = -mwindows -lkernel32 -lgdi32 -luser32 -ladvapi32 -lcomctl32 -lole32 -lshlwapi -lshell32 -loleaut32 -lversion
TARGET = winfile
ifeq ($(OS),Windows_NT)
TARGET := $(TARGET).exe
endif
CC ?= gcc
CXX ?= g++
WINDRES = windres
RM = rm -f
.PHONY: all depend clean
.SUFFIXES: .c .cpp .o .res
all : $(TARGET)
$(TARGET) : $(OBJS)
$(CXX) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
.c.o :
$(CC) -c $(CFLAGS) -I. $< -o $@
.cpp.o :
$(CXX) -c $(CFLAGS) -I. $< -o $@
src/res.o : src/res.rc src/lang/*.rc src/lang/*.dlg
$(WINDRES) -DNOWINRES -I. -Isrc/ -i src/res.rc -o src/res.o
clean :
$(RM) $(OBJS) $(TARGET)
depend:
$(CC) -E -MM -w src/*.c > Makefile.depends
-include Makefile.depends