home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
me34exe.zip
/
me
/
makefile.emx
Wrap
Makefile
|
1995-01-21
|
4KB
|
130 lines
# Makefile for ME
# modified to compile using the emx/gcc compiler, version 0.8h
# I use dmake -- I guess GNU make will work, too
##########################################################################
## Start of User Configuration ##
##########################################################################
# You may also need to configure config.h. It tries to self configure,
# but there is a chance it may not.
# Some of the files mentioned here are in the misc/ directory. If you
# want to use one of them, copy it to this directory before compiling.
#
# This makefile is set up to build three `versions' of the executables.
# The appropriate variables for each is set below.
#
# Terminal library.
# for emx, use -lvideo if using the emx video libraries (emx2io.c). If using
# OS/2 vio calls (emx1io.c), don't use anything here.
# normal case -- vio for video
#TERMLIB=
# emx's video library (emx2io.c). This allows a 32-bit DOS executable,
# but it's slower.
#TERMLIB = -lvideo
# I/O type. Use 1 of (used to configure config.h):
# blank : The normal case
# -DXIO : If using X11
#
IO_TYPE = -DPCIO=1
# I/O. Use 1 of:
# emx1io$O : OS/2 only. Uses vio and kbd
# emx2io$O : OS/2 and MS-DOS. Uses emx's -lvideo and termio
#normal case:
#IO = emx1io$O
# emx's -lvideo (slower than vio) (in misc/)
#IO = emx2io$O
# "Special" keymap support (above and beyond ASCII). Use 1 of:
KEYMAP = os2kmap$O
# How to read and write files. Use 1 of:
# fileio.c : The normal case
# pcfileio.obj : Special support for IBM PCs. Implements a cached
# read using some asm code. Your compiler may not be able to
# compile it. (in misc/). You don't need this, fileio.c
# works fine.
#
# we don't use os2filio.c, since all this does is {\it decrease} the size
# of the stdio cache
FILEIO = fileio$O
# Compute server library. Make sure you sync this with COMPUTE_SERVER
# in config.h.
# if COMPUTE_SERVER is 1:
# ../comserver/cliserve.a : non-SYSV unix, no MS-DOS
# if COMPUTE_SERVER is 0:
# blank : If your OS doesn't support the compute server. The simple case.
#
#PROCESS = ../comserver/cliserve.a # unixen
PROCESS = # atariST (TOS/MiNT) (yes MiNT too!)
# What Mutt code to compile into ME
# Use:
# ../mutt/builtin/me3.mco
# or your own Mutt file.
# Note: The Mutt code must be compiled before this Makefile is run.
#
internal_Mutt = ../mutt/builtin/me3.mco #./boot.mco
##########################################################################
## End of User Configuration ##
##########################################################################
SRC = bag.c basic.c buffer.c bvar.c display.c file.c line.c \
main.c os.c misc.c mline.c mark.c random.c region.c regexp.c search.c \
spawn.c window.c word.c undo.c key.c help.c mmaux.c mmfcn.c mmfcn2.c \
case.c process.c mutt.c
OBJ = $(SRC:.c=$O)
LIB = ../util/util$A ../ed/ed$A ../ed/led$A ../mc/mm2$A
ME_OBJ = $(OBJ) $(TERMINAL) $(IO) $(KEYMAP) $(FILEIO)
CFLAGS = $(BASECFLAGS) $(IO_TYPE) -I. -I../mc -I../ed -I../util
oops .PHONY:
@echo "You need to specify which version to compile\n\temx-mt\tOS/2-only using emx.dll and emxlibc.dll\n\temx-st\tOS/2-only with no special .dlls\n\temx-dos\tOS/2 and DOS using emx.dll or emx.exe"
emx-mt .PHONY :
$(MAKE) $(MAKEFILE) O=.obj A=.lib BASECFLAGS="-Zomf -Zmtd $(BASECFLAGS)" CC=$(CC) \
LDFLAGS="-Zomf -Zmtd -Zlinker /base:0x10000/align:4/exepack/st:0x9000 -s" \
IO=emx1io.obj TERMLIB="" DEF=me3.def ME
emx-st .PHONY :
$(MAKE) $(MAKEFILE) O=.obj A=.lib BASECFLAGS="-Zomf -Zsys $(BASECFLAGS)" CC=$(CC) \
LDFLAGS="-Zomf -Zsys -Zlinker /base:0x10000/align:4/exepack/st:0x9000 -s" \
IO=emx1io.obj TERMLIB="" DEF=me3.def ME
emx-dos .PHONY :
$(MAKE) $(MAKEFILE) O=.o A=.a BASECFLAGS="$(BASECFLAGS)" CC=$(CC) \
LDFLAGS="-s" IO=emx2io.o TERMLIB="-lvideo" DEF="" ME
ME .PHONY: announce me3$E
announce .PHONY:
@echo "**** Building the Mutt Editor ********"
@echo "CC is:" $(CC)
@echo "CFLAGS are:" $(CFLAGS)
me3$E: mutt.c $(ME_OBJ) $(LIB)
$(CC) -o me3$E $(ME_OBJ) $(PROCESS) $(DEF) -L../mc -L../ed -L../util \
-lmm2 -lled -led -lutil $(TERMLIB) $(LDFLAGS)
# build the internal Mutt code
mutt.c : $(internal_Mutt)
../mc/mco_to_c $(internal_Mutt) > mutt.c
clean:
rm -f *.obj *.o mutt.c
realclean: clean
rm -f me3$E