home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Shareware 1999 March
/
PCShareware-3-99.iso
/
IMPLE
/
DJGPP.RAR
/
DJGPP2
/
XLIB-SR0.ZIP
/
SRC
/
XLIBEMU
/
MAKEFILE
< prev
next >
Wrap
Text File
|
1994-09-05
|
5KB
|
162 lines
# Makefile for Xlibemu, an Xlib emulation based on GRX
# $Id: makefile 1.6 1994/02/11 00:43:44 ulrich Exp ulrich $
.NOEXPORT:
# Directory for unmodified sources
MITLIBX_DIR = /xlib/src/x11/mit/lib/x
# GRX installation directory
GRXDIR = /djgpp/contrib/libgrx
# GRX font dir
FNTDIR = $(GRXDIR)/allfonts
# Directory for include <X11/...>
INCDIR = /xlib/include
# Directory for installing libX11.a
LIBDIR = /xlib/lib
# Where to find sources
vpath %.c $(MITLIBX_DIR)
# Sources
EMULIBSRC = \
atom.c backgnd.c bdrwidt.c bell.c border.c chcmap.c \
chkeycon.c chsavese.c chwattr.c chwindo.c cirwin.c cirwind.c \
cirwinu.c clear.c clearar.c color.c confwin.c copyarea.c \
copyplan.c crwindo.c cursfnt.c cursor.c debug.c defcurs.c \
destsub.c destwin.c dispatch.c draw.c drawtext.c error.c \
event.c eventque.c font.c gc.c getgeom.c getifocu.c \
getkcnt.c getpntma.c getwatt.c globals.c grabkeyb.c internal.c \
loadkeym.c lowerwi.c maprais.c mapsubs.c mapwind.c misc.c \
modmap.c movewin.c opendisp.c pixmap.c pmapbgn.c pmapbor.c \
pointer.c property.c putimage.c qutree.c raisewi.c reconfw.c \
repwind.c selectio.c selinpu.c sendeven.c setcrect.c setdash.c \
setifocu.c setlocal.c todo.c trcoord.c undefcu.c unldfont.c \
unmapsu.c unmapwi.c window.c winint.c xrminitp.c \
gethostn.c console.c xreadsen.c
# Unmodified sources from X11R5 distribution
# (actually from export.lcs.mit.edu:/pub/R5untarred/mit/lib/X/*)
MITLIBSRC = \
xparsege.c xdisname.c xmacros.c xregion.c \
xstname.c xsethint.c xgethint.c xfetchna.c \
getnrmhi.c getwmcma.c getwmpro.c getrgbcm.c \
gettxtpr.c settxtpr.c texttost.c \
setwmpro.c setwmprp.c setwmcma.c xsetclma.c xsetstip.c \
xnexteve.c xputbeve.c xpeekeve.c xpeekife.c xpending.c \
xifevent.c xfiltere.c xgetdflt.c xerrdes.c context.c strtotex.c \
propallo.c setnrmhi.c xchkwine.c xsettsor.c xrdbitf.c iconify.c \
xwineven.c xchkifev.c xgetfpro.c evtomask.c xmaskeve.c xchkmask.c \
xchktypw.c xchktype.c xstbytes.c xerrhndl.c ximutil.c xkeybind.c \
xstrkeys.c xkeysyms.c xscrress.c xautorep.c xgeom.c xmisc.c \
xchgc.c xsetlsty.c xsetfont.c xgcmisc.c xsetback.c xsetfore.c \
xsettile.c xsetpmas.c xsetfunc.c getgcval.c depths.c wmgeom.c \
xinitext.c xfswrap.c xlcwrap.c xvisutil.c withdraw.c \
quarks.c xrm.c parsecmd.c xrminitp.c
X11LIBSRC = $(EMULIBSRC) $(MITLIBSRC)
X11LIBOBJ = $(X11LIBSRC:.c=.o)
X11LIB = libX11.a
X11LIBOBJ_P = $(addprefix prof/,$(X11LIBOBJ))
X11LIB_P = libX11_p.a
TESTSRC = debug.c hello.c makemodm.c
TESTOBJ = $(TESTSRC:.c=.o)
ALLSRCS = $(X11LIBSRC) $(TESTSRC)
# LIBS = -lfvwm -L. -lX11 -L$(GRXDIR)/lib -lgrx -lpc
LIBS = -L$(LIBDIR) -lfvwm -lX11 -L$(GRXDIR)/lib -lgrx -lpc
# Misc
AWK = gawk
RUN = go32
MODMAP = xmodmap.gr
INSTALL = cp -uv
LONARGS = ar:cp:
# Compiler options
CC = gcc
CFLAGS = -W -O2 -m486 -DGRX $(CFLAGS_DEBUG) \
-I. -I$(MITLIBX_DIR) -I- -I$(GRXDIR)/include -I$(INCDIR)
CFLAGS_DEBUG = # -DDEBUG # -g
# Rules
%.o : %.c
$(CC) $(CFLAGS) -o $@ -c $<
%.s : %.c
$(CC) $(CFLAGS) -S -o $@ -c $<
prof/%.o : %.c
$(CC) -pg $(CFLAGS) -o $@ -c $<
# Targets
default: $(X11LIB) hello cursor.fnt
.PHONY: install
install: $(X11LIB) xfonts.dir
$(INSTALL) $(X11LIB) $(LIBDIR)/$(X11LIB)
$(INSTALL) xfonts.dir $(FNTDIR)
$(X11LIB): $(X11LIBOBJ)
ar rv $@ $?
ranlib $@
$(X11LIB_P): $(X11LIBOBJ_P)
ar rv $@ $?
ranlib $@
ks_tables.h: util/makekeys.c
$(CC) -o makekeys $<
$(RUN) makekeys < $(X11INC)/X11/keysymdef.h > ks_table.tmp
mv -f ks_table.tmp $@
rm -f makekeys ks_table.tmp
modmap.h: $(MODMAP) makemodm.c
$(CC) -o makemodm makemodm.c
$(RUN) makemodm < $< > $@
rm -f makemodm
rgb.h: rgb.txt rgb.awk
$(AWK) -f rgb.awk rgb.txt > $@
hello: hello.o debug.o # $(X11LIB)
$(CC) $(CFLAGS) -o $@ hello.o debug.o $(LIBS)
console: console.c $(X11LIB)
$(CC) -g -DTEST $(CFLAGS) -o $@ $^ $(LIBS)
term: term.c $(X11LIB)
$(CC) $(CFLAGS) -DTEST -o $@ $^ $(LIBS)
cursor.fnt: cursfnt
$(RUN) cursfnt
cursfnt: cursfnt.c cursor.h
$(CC) $(CFLAGS) -o $@ $< -L$(GRXDIR)/lib -lgrx
xfonts.dir: makxfdir
$(RUN) makxfdir -o $@ $(FNTDIR)/*.fnt
makxfdir: makxfdir.c
$(CC) $(CFLAGS) -o $@ $<
.PHONY: depend
depend: $(ALLSRCS)
$(CC) $(CFLAGS) -MM $^ > makefile.dep
.PHONY: clean
clean:
rm -f *.o cursfnt term makxfdir
.PHONY: clobber
clobber: clean
rm -f *.a hello cursor.fnt modmap.h rgb.h xfonts.dir
# Source dependencies
ifneq ($(wildcard makefile.dep),)
include makefile.dep
endif