1# *****************************************************************************
2# *									      *
3# *		     SPUNK MAKEFILE for FreeBSD using g++		      *
4# *									      *
5# * (C) 1993-96  Ullrich von Bassewitz					      *
6# *		 Wacholderweg 14					      *
7# *		 D-70597 Stuttgart					      *
8# * EMail:	 uz@ibb.schwaben.com					      *
9# *									      *
10# *****************************************************************************
11
12
13
14# $Id$
15#
16# $Log$
17#
18#
19
20
21
22# ------------------------------------------------------------------------------
23# Definitions
24
25# Names of executables
26AS = gas
27AR = ar
28LD = ld
29ZIP = zip
30CC?= g++
31
32# Flags for the gnu compiler
33CFLAGS	+= -DFREEBSD -g -Wall -x c++ -fno-implicit-templates -DEXPLICIT_TEMPLATES
34
35LIB	= spunk.a
36ZIPFILE = spunk.zip
37
38# ------------------------------------------------------------------------------
39# Implicit rules
40
41.c.o:
42	$(CC) $(CFLAGS) -c $<
43
44.cc.o:
45	$(CC) $(CFLAGS) -c $<
46
47# ------------------------------------------------------------------------------
48# All SPUNK OBJ files
49
50OBJS	=	bitset.o	\
51		charset.o	\
52		charstrm.o	\
53		chartype.o	\
54		check.o		\
55		coll.o		\
56		cont.o		\
57		cpucvt.o	\
58		crc16.o		\
59		crc32.o		\
60		crcccitt.o	\
61		crcstrm.o	\
62		datetime.o	\
63		delay.o		\
64		environ.o	\
65		errlog.o	\
66		event.o		\
67		filecoll.o	\
68		filepath.o	\
69		filesel.o	\
70		filesys.o	\
71		frame.o		\
72		fviewer.o	\
73		inifile.o	\
74		itemlbl.o	\
75		itemwin.o	\
76		kbd.o		\
77		keydef.o	\
78		keymap.o	\
79		listnode.o	\
80		memcheck.o	\
81		memstrm.o	\
82		menue.o		\
83		menuedit.o	\
84		menuitem.o	\
85		msg.o		\
86		msgcoll.o	\
87		national.o	\
88		nlsinit.o	\
89		nullstrm.o	\
90		object.o	\
91		palette.o	\
92		password.o	\
93		program.o	\
94		progutil.o	\
95		rect.o		\
96		rescoll.o	\
97		resource.o	\
98		rng.o		\
99		screen.o	\
100		screen2.o	\
101		sercom.o	\
102		serstrm.o	\
103		settings.o	\
104		splitmsg.o	\
105		statline.o	\
106		stdmenue.o	\
107		stdmsg.o	\
108		str.o		\
109		strbox.o	\
110		strcoll.o	\
111		strcvt.o	\
112		stream.o	\
113		strmable.o	\
114		strparse.o	\
115		strpool.o	\
116		syserror.o	\
117		textitem.o	\
118		textstrm.o	\
119		thread.o	\
120		winattr.o	\
121		window.o	\
122		winmgr.o	\
123		winsize.o
124
125# ------------------------------------------------------------------------------
126# All resedit OBJ files
127
128RESEDITOBJS	=	resed.o		\
129			resedit.o	\
130			resfile.o	\
131			resitem.o	\
132			resprint.o	\
133			resutil.o	\
134			reswin.o
135
136# ------------------------------------------------------------------------------
137# Dummy targets
138
139resed:	$(LIB) $(RESEDITOBJS)
140	$(CC) -g -o resed $(RESEDITOBJS) $(LIB) -ltermcap
141
142lib:	$(LIB)
143
144# ------------------------------------------------------------------------------
145# Library
146
147$(LIB):		$(OBJS)
148	$(AR) r $(LIB) $?
149	ranlib $(LIB)
150
151depend dep:
152	@echo "Creating dependency information"
153	$(CC) ${CFLAGS} -MM *.cc > .depend
154
155# ------------------------------------------------------------------------------
156# Target specific files
157
158delay.o:	unixsrc/delay.cc $(HDRS)
159	$(CC) $(CFLAGS) -c $<
160
161filesys.o:	unixsrc/filesys.cc $(HDRS)
162	$(CC) $(CFLAGS) -c $<
163
164kbd.o:		bsdsrc/kbd.cc $(HDRS)
165	$(CC) $(CFLAGS) -c $<
166
167nlsinit.o:	unixsrc/nlsinit.cc $(HDRS)
168	$(CC) $(CFLAGS) -c $<
169
170screen.o:	bsdsrc/screen.cc $(HDRS)
171	$(CC) $(CFLAGS) -c $<
172
173screen2.o:	unixsrc/screen2.cc $(HDRS)
174	$(CC) $(CFLAGS) -c $<
175
176sercom.o:	unixsrc/sercom.cc $(HDRS)
177	$(CC) $(CFLAGS) -c $<
178
179# ------------------------------------------------------------------------------
180# Create a ZIP file
181
182zip:
183	-rm -f spunk.zip
184	-rm -f *.bak *~
185	$(ZIP) $(ZIPFILE) *.cc *.h bccdos.cfg bccos2.cfg baseres.res resed.res
186	-cp Makefile make/freebsd.mak
187	$(ZIP) $(ZIPFILE) copying.txt todo.txt spunk.chg make/*
188	$(ZIP) $(ZIPFILE) dossrc/*.cc dossrc/*.asm
189	$(ZIP) $(ZIPFILE) dos32src/*.cc dos32src/*.asm djgppsrc\*.cc
190	$(ZIP) $(ZIPFILE) linuxsrc/*.cc os2src/*.cc bsdsrc/*.cc unixsrc/*.cc
191	$(ZIP) $(ZIPFILE) xsrc/*.cc samples/*
192	$(ZIP) $(ZIPFILE) doc/*.doc support/* data/*
193
194# ------------------------------------------------------------------------------
195# clean up
196
197clean:
198	-rm -f *~ linuxsrc/*~ bsdsrc/*~ unixsrc/*~
199	-rm -f *.o
200	-rm -f resed $(LIB) $(ZIPFILE)
201
202zap:	clean
203	-rm -f .depend
204
205
206
207
208