mc/os2/Makefile.OS2
Pavel Machek b8da58830e Numerous patches for OS/2 and Windows NT. lstat detects executables
(stat is broken in Borland C). Help looks better.
1998-03-23 23:06:36 +00:00

149 lines
3.0 KiB
Makefile

# Makefile
# Written by Dan Nicolaescu
# 970423 hacked by Juan f. Grigera
# 970525 hacked again by jfg to add internal editor
# 971127 hacked by Pavel Roskin to make it work with mc-4.1.11
# 980206 hacked by Pavel Roskin to make it work with GNU make
#
# This is the Makefile for Midnight Commander under OS/2.
#
# Supported Compilers:
#
# makefile.vc4: Microsoft Visual C++ 4.x
# ...
# ---- Directories
MC_NT_DIR=.
MC_SRC_DIR=../src
VFS_DIR=../vfs
MCEDIT_SRC_DIR=../edit
MCEDIT_OBJS_DIR=$(OBJS_DIR)/edit
SLANG_SRC_DIR=../slang
SLANG_OBJS_DIR=$(OBJS_DIR)/slang
# --- Midnight Defines
MC_DEFINES=$(SPECIFIC_DEFINES) -D_CONSOLE -DHAVE_CONFIG_H -DUSE_INTERNAL_EDIT
MC_INCLUDES=-I$(MC_SRC_DIR) -I$(MC_NT_DIR) -I$(SLANG_SRC_DIR)
SLANG_DEFINES=$(SPECIFIC_DEFINES)
SLANG_INCLUDES=-I$(MC_NT_DIR) -I$(SLANG_SRC_DIR)
MCEDIT_DEFINES=$(SPECIFIC_DEFINES) -D_CONSOLE -DHAVE_CONFIG_H
MCEDIT_INCLUDES=-I$(MC_NT_DIR) -I$(MC_SRC_DIR)/.. -I$(SLANG_SRC_DIR)
CFLAGS=$(SPECIFIC_MC_CFLAGS) $(MC_INCLUDES) $(MC_DEFINES) -c
SLANG_CFLAGS=$(SPECIFIC_SLANG_CFLAGS) $(SLANG_INCLUDES) $(SLANG_DEFINES) -c
MCEDIT_CFLAGS=$(SPECIFIC_MCEDIT_CFLAGS) $(MCEDIT_INCLUDES) $(MCEDIT_DEFINES) -c
RSC_FLAGS=$(RES_PLACE)$(OBJS_DIR)/mc.res $(RC_DEFINES)
all: object-dirs mc
object-dirs: $(OBJS_DIR) $(SLANG_OBJS_DIR) $(MCEDIT_OBJS_DIR)
mc: $(OBJS_DIR)/mc.exe
clean:
deltree -y "$(SLANG_OBJS_DIR)"
deltree -y "$(MCEDIT_OBJS_DIR)"
deltree -y "$(OBJS_DIR)"
$(OBJS_DIR):
mkdir "$@"
$(SLANG_OBJS_DIR):
mkdir "$@"
$(MCEDIT_OBJS_DIR):
mkdir "$@"
$(OBJS_DIR)/%.$(OBJ_SUFFIX): $(MC_NT_DIR)/%.c
$(CC) $(CFLAGS) $(OBJ_PLACE)$@ $<
$(OBJS_DIR)/%.$(OBJ_SUFFIX): $(MC_SRC_DIR)/%.c
$(CC) $(CFLAGS) $(OBJ_PLACE)$@ $<
$(SLANG_OBJS_DIR)/%.$(OBJ_SUFFIX): $(SLANG_SRC_DIR)/%.c
$(CC) $(SLANG_CFLAGS) $(OBJ_PLACE)$@ $<
$(MCEDIT_OBJS_DIR)/%.$(OBJ_SUFFIX): $(MCEDIT_SRC_DIR)/%.c
$(CC) $(MCEDIT_CFLAGS) $(OBJ_PLACE)$@ $<
SRCS= $(EXTRA_MC_SRCS) \
util.os2.c \
terms.c \
user.c \
subshell.c \
file.c \
listmode.c \
cmd.c \
dirent.os2.c \
command.c \
help.c \
menu.c \
view.c \
dir.c \
info.c \
widget.c \
cons.handler.os2.c \
option.c \
dlg.c \
panelize.c \
profile.c \
util.c \
dialog.c \
ext.c \
color.c \
drive.os2.c \
key.os2.c \
layout.c \
setup.c \
regex.c \
hotlist.c \
slint.os2.c \
tree.c \
win.c \
chmod.os2.c \
complete.c \
find.c \
wtools.c \
boxes.c \
background.c \
dirhist.c \
main.c \
popt.c \
text.c \
screen.c
SLANG_SRCS= \
slos2tty.c \
slerr.c \
slgetkey.c \
slsmg.c \
slvideo.c
MCEDIT_SRCS= \
edit.c \
editcmd.c \
editdraw.c \
editmenu.c \
editoptions.c \
editwidget.c \
wordproc.c
OBJS=$(addprefix $(OBJS_DIR)/, \
$(patsubst %.c,%.$(OBJ_SUFFIX),$(SRCS)))
SLANG_OBJS=$(addprefix $(SLANG_OBJS_DIR)/, \
$(patsubst %.c,%.$(OBJ_SUFFIX),$(SLANG_SRCS)))
MCEDIT_OBJS=$(addprefix $(MCEDIT_OBJS_DIR)/, \
$(patsubst %.c,%.$(OBJ_SUFFIX),$(MCEDIT_SRCS)))
ifdef RSC
MC_RES=$(OBJS_DIR)/mc.res
else
MC_RES=
endif
$(OBJS_DIR)/mc.res: $(MC_NT_DIR)/mc.rc $(MC_NT_DIR)/mc.ico $(MC_NT_DIR)/config.h ../VERSION
$(RSC) $(RSC_FLAGS) $(MC_NT_DIR)/mc.rc