File: Makeprog.rules.in

package info (click to toggle)
wine 0.0.20020411-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 43,012 kB
  • ctags: 104,265
  • sloc: ansic: 550,196; perl: 21,747; yacc: 3,990; sh: 3,904; makefile: 3,297; tcl: 2,616; lex: 2,443
file content (54 lines) | stat: -rw-r--r-- 1,447 bytes parent folder | download
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
# Global rules for building a Winelib program     -*-Makefile-*-
#
# Each individual makefile should define the following variables:
# MODULE       : name of the main module being built
# EXTRALIBS    : extra libraries to link in (optional)
# EXTRADEFS    : extra symbol definitions, like -DWINELIB (optional)
#
# plus all variables required by the global Make.rules.in
#

DEFS       = @DLLFLAGS@ -DSTRICT -DNONAMELESSUNION -DNONAMELESSSTRUCT $(EXTRADEFS)
LDDLLFLAGS = @LDDLLFLAGS@
ALL_OBJS   = $(MODULE).spec.o $(OBJS)
ALL_LIBS   = $(LIBWINE) $(EXTRALIBS) $(LIBS)
SYMBOLFILE = $(MODULE).tmp.o

all: $(MODULE)

@MAKE_RULES@

# Rules for main module

$(MODULE).so: $(ALL_OBJS) Makefile.in
	$(LDSHARED) $(LDDLLFLAGS) $(ALL_OBJS) -o $@ $(ALL_LIBS)

$(MODULE): $(MODULE).so
	$(RM) $(MODULE) && $(LN_S) $(TOPOBJDIR)/wine $(MODULE)

# Rules for checking that no imports are missing

checklink:: $(MODULE).so
	$(CC) -o checklink $(TOPSRCDIR)/library/checklink.c $(MODULE).so $(ALL_LIBS) && $(RM) checklink

# Rules for testing

$(TESTRESULTS): $(MODULE).so

# Rules for debug channels

debug_channels: dummy
	$(TOPSRCDIR)/tools/make_debug $(MODULE).spec $(C_SRCS)

# Rules for installation

install:: $(MODULE).so
	[ -d $(bindir) ] || $(MKDIR) $(bindir)
	$(INSTALL_PROGRAM) $(MODULE).so $(bindir)/$(MODULE).so
	cd $(bindir) && $(RM) $(MODULE) && $(LN_S) wine $(MODULE)

uninstall::
	cd $(bindir) && $(RM) $(MODULE) $(MODULE).so

clean::
	$(RM) $(MODULE)