File: Makefile

package info (click to toggle)
cmigemo 1:1.2+gh0.20150404-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,672 kB
  • sloc: ansic: 2,617; cs: 188; makefile: 174; sh: 107; cpp: 67; perl: 59; csh: 49
file content (52 lines) | stat: -rw-r--r-- 1,497 bytes parent folder | download | duplicates (4)
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
# Copyright 2005 MURAOKA Taro(KoRoN)/KaoriYa

GECKO_SDKDIR 	= D:\software\gecko-sdk
MIGEMO_DIR	= ..

IDLNAME		= nsIMigemo
SRC		= nsIMigemoModule.cpp nsMigemo.cpp
SRC_MIGEMO	= $(MIGEMO_DIR)\src\charset.c $(MIGEMO_DIR)\src\filename.c \
		  $(MIGEMO_DIR)\src\migemo.c $(MIGEMO_DIR)\src\mnode.c \
		  $(MIGEMO_DIR)\src\romaji.c $(MIGEMO_DIR)\src\rxgen.c \
		  $(MIGEMO_DIR)\src\wordbuf.c $(MIGEMO_DIR)\src\wordlist.c
OBJ_MIGEMO	= charset.obj filename.obj migemo.obj mnode.obj romaji.obj \
		  rxgen.obj wordbuf.obj wordlist.obj
OBJ		= $(SRC:.cpp=.obj) $(OBJ_MIGEMO)

INC		= -I $(GECKO_SDKDIR)\include -I $(MIGEMO_DIR)\src
DEF		= -D NDEBUG -D WIN32 -D _WINDOWS -D _MBCS -D _USRDLL \
		  -D XPCOM_GLUE
LIBS		= nspr4.lib plc4.lib plds4.lib xpcom.lib xpcomglue.lib

CFLAGS		= -nologo $(INC) $(DEF) -MD -W3 -O1
CPPFLAGS	= $(CFLAGS)
LD		= link.exe
LDFLAGS		= -nologo -machine:I386 -libpath:$(GECKO_SDKDIR)\lib
XPIDL		= $(GECKO_SDKDIR)\bin\xpidl
XPIDL_FLAGS	= -I $(GECKO_SDKDIR)\idl

target: $(IDLNAME).xpt $(IDLNAME).dll

$(IDLNAME).dll: $(OBJ)
	$(LD) $(LDFLAGS) -dll -out:$@ -implib:$(IDLNAME).lib $(LIBS) $(OBJ)

$(IDLNAME).xpt: $(IDLNAME).idl
	$(XPIDL) -m typelib $(XPIDL_FLAGS) $(IDLNAME).idl

$(IDLNAME).h: $(IDLNAME).idl
	$(XPIDL) -m header $(XPIDL_FLAGS) $(IDLNAME).idl

clean:
	del /F $(IDLNAME).lib
	del /F $(IDLNAME).exp
	del /F *.obj

distclean: clean
	del /F $(IDLNAME).xpt
	del /F $(IDLNAME).h
	del /F $(IDLNAME).dll

include depend.mak

{$(MIGEMO_DIR)\src}.c.obj:
	$(CC) $(CFLAGS) -Fo$@ /c $<