File: Plugin.tmpasm

package info (click to toggle)
fungw 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,268 kB
  • sloc: ansic: 24,257; makefile: 500; sh: 32; awk: 9; perl: 8; tcl: 7; javascript: 7; ruby: 7; python: 6
file content (137 lines) | stat: -rw-r--r-- 3,996 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
append /local/fungw/summary [~ ~/local/fungw/mod~::e~]
put /local/fungw/mod_mak     [~~/local/fungw/mod_dir~/~/local/fungw/mod~.mak~]
put /local/fungw/mod_mak_bn  [~~/local/fungw/mod~.mak~]
put /local/fungw/mod_pupfile [~~/local/fungw/mod~.pup~]

append /local/fungw/bindings /local/fungw/mod_dir { }

uniq /local/fungw/mod_obj /local/fungw/mod_src
append /local/fungw/mod_obj { }
gsub /local/fungw/mod_obj {.c[ \t\r\n]} {.o }

redir [@@/local/fungw/mod_dir@/Makefile@]

print [~# Generated by ./configure - DO NOT EDIT
# Compile the plugin locally.

FUNGWROOT=../../
FUNGW = $(FUNGWROOT)/libfungw

PREFIX=~/local/fungw/prefix~
LIBDIR=$(install_root)$(DESTDIR)$(PREFIX)/~/local/fungw/libdirname~
PUPDIR=$(install_root)$(DESTDIR)$(PREFIX)/~/local/fungw/pupdirname~

CFLAGS = -Wall -g -I$(FUNGWROOT) -I../../src_3rd ~cc/cflags~ ~?cc/fpic~ ~?/local/fungw/mod_cflags~
LDFLAGS = ~?cc/ldflags~ ~?/local/fungw/mod_ldflags~
SCCBOX = $(FUNGWROOT)/scconfig/sccbox
LIBA = ~/local/fungw/mod~.a
LIBSO = ~/local/fungw/mod~~/target/sys/ext_dynlib~
LIBSO_X = $(LIBSO).~/local/fungw/ver1~
LIBSO_XY = $(LIBSO).~/local/fungw/ver1~.~/local/fungw/ver2~
LIBSO_XYZ = $(LIBSO).~/local/fungw/ver1~.~/local/fungw/ver2~.~/local/fungw/ver3~
OBJS = ~/local/fungw/mod_obj~

~]

switch /target/cc/soname
	case {^$}
		put /local/fungw/mod_soname {}
		end
	default
		put /local/fungw/mod_soname [@@/target/cc/soname@lib$(LIBSO_X)@]
		end
end


print [~

all: $(LIBA) $(LIBSO)

$(LIBA): $(OBJS)
	$(SCCBOX) rm -f $(LIBA)
	@~/host/fstools/ar~ r $(LIBA) $(OBJS)

$(LIBSO): $(OBJS)
	$(CC)  $(OBJS) -o $(LIBSO) $(LDFLAGS) ~?/target/cc/ldflags_dynlib~ ~?/local/fungw/mod_soname~ ~?/target/cc/so_undefined~


### Rules for compiling objects ###
~]

foreach /local/fungw/c in /local/fungw/mod_src
	put /local/fungw/o /local/fungw/c
	sub /local/fungw/o {.c$} {.o}
	print [~
~/local/fungw/o~: ~/local/fungw/c~ $(FUNGWROOT)/libfungw/fungw.h
	$(CC) -c $(CFLAGS) -o ~/local/fungw/o~ ~/local/fungw/c~
~]
end

foreach /local/fungw/c in ?/local/fungw/cquote
			print [~

~/local/fungw/c~.h: ~/local/fungw/c~
	$(FUNGWROOT)/scconfig/cquote -p static -n ~/local/fungw/c~ < ~/local/fungw/c~ > ~/local/fungw/c~.h
~]
end

print [~

~?/local/fungw/mod_extra_rules~

clean:
	$(SCCBOX) rm -f $(LIBA) $(LIBSO) $(OBJS)

distclean: clean
	rm ~?/local/fungw/mod_distclean_files~ Makefile ~/local/fungw/mod_mak_bn~

install_: $(LIBA) $(LIBSO)
	$(SCCBOX) mkdir $(IOP) -p $(PUPDIR)
	$(SCCBOX) install $(IOP) $(LIBA) $(LIBDIR)/lib$(LIBA)
	$(SCCBOX) install $(IOP) $(LIBSO) $(LIBDIR)/lib$(LIBSO_XYZ)
	$(SCCBOX) install $(IOP) ~/local/fungw/mod_mak_bn~ $(PUPDIR)/~/local/fungw/mod_mak_bn~
	$(SCCBOX) install $(IOP) ~/local/fungw/mod_pupfile~ $(PUPDIR)/~/local/fungw/mod_pupfile~
~?/local/fungw/mod_install_~

install_link: $(LIBA) $(LIBSO)
	$(SCCBOX) install $(IOP) --relative $(LIBDIR)/lib$(LIBA) $(PUPDIR)/$(LIBA)
	$(SCCBOX) install $(IOP) --relative $(LIBDIR)/lib$(LIBSO_XYZ) $(PUPDIR)/$(LIBSO)
	$(SCCBOX) install $(IOP) --relative $(LIBDIR)/lib$(LIBSO_XYZ) $(LIBDIR)/lib$(LIBSO_XY)
	$(SCCBOX) install $(IOP) --relative $(LIBDIR)/lib$(LIBSO_XYZ) $(LIBDIR)/lib$(LIBSO_X)
~?/local/fungw/mod_install_link~

install:
	$(MAKE) install_ IOP="-i"
	$(MAKE) install_link IOP="-l"

linstall:
	$(MAKE) install_ IOP="-l"
	$(MAKE) install_link IOP="-l"

uninstall:
	$(MAKE) install_link IOP="-u"
	$(MAKE) install_ IOP="-u"
~]

redir /local/fungw/mod_mak

print [~# Generated by ./configure - DO NOT EDIT
# Use these flags when linking the plugin without puplug

CFLAGS_~/local/fungw/mod~ =  ~?/local/fungw/mod_cflags~
LDFLAGS_~/local/fungw/mod~ = ~?/local/fungw/mod_ldflags~

# Use the system-installed version
LIBA_~/local/fungw/mod~ = /usr/lib/puplug/~/local/fungw/mod~.a

# Link from source tree; user needs to set $(FUNGWBIND)
SRCLIBA_~/local/fungw/mod~ = $(FUNGWBIND)/~/local/fungw/mod_dir~/~/local/fungw/mod~.a

~]

redir

put /local/fungw/mod_distclean_files {}
put /local/fungw/mod_extra_rules {}
put /local/fungw/mod_install_ {}
put /local/fungw/mod_install_link {}