-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (53 loc) · 1.29 KB
/
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
##
#include config.dmd
TARGET = win32Dnd.exe
OBJS = winMain.obj debugLog.obj drop_target.obj utils.obj \
data_object.obj drop_source.obj enum_format.obj
#RES = resource.res
####
## http://gcc.gnu.org/onlinedocs/gcc/Invoking-GCC.html
CC = gcc
CXX = g++
CFLAGS = -Wall -O2
CLDFLAGS =
CINCLUDES = -I/usr/local/include
CLIBS = -L/usr/local/lib -lm
####
## http://dlang.org/dmd-windows.html
DMD = dmd
DFLAGS = -g -wi
#DFLAGS = -O -release -inline -noboundscheck
DLDFLAGS = -L/SUBSYSTEM:WINDOWS:5.01
DMDLIBS = lib/dmd_win32.lib
####
## http://www.digitalmars.com/ctg/sc.html
DMC = dmc
DMCFLAGS = -HP99 -g -o+none -D_WIN32_WINNT=0x0400 -I$(SETUPHDIR) $(CPPFLAGS)
DMCLIB = lib
DMCLIBFLAGS = lib -p512 -c -n
##---------------
# $@ : Target name
# $^ : depend Target name
# $< : Target Top Name
# $* : Target name with out suffix name
# $(MACRO:STING1=STRING2) : Replace STRING1 to STRING2
#
all : $(TARGET)
$(TARGET) : $(OBJS)
$(DMD) $(OBJS) $(RES) $(DMDLIBS) $(DLDFLAGS) -of$@
#$(DTARGET) : $(SRC)
# $(DMD) $(SRC) $(RES) $(DMDLIBS) $(DLDFLAGS) -of$@
test :
$(TARGET)
clean :
del *.obj
del *.exe
del *.bak
# -rm -f $(TARGET) $(OBJS)
.c.obj :
$(CC) $(CFLAGS) $(INCLUDES) -c $<
.d.obj :
$(DMD) $(DFLAGS) -c $<
# Depend of header file
# obj : header
# foo.obj : foo.h