1998-04-14 22:04:01 +04:00
|
|
|
# Makefile.PC
|
|
|
|
#
|
|
|
|
# This is the Makefile for Midnight Commander under OS/2 and Windows NT
|
|
|
|
#
|
1998-04-09 06:21:49 +04:00
|
|
|
# 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
|
|
|
|
# 980329 changed by Pavel Roskin to make it common for OS/2 and NT
|
|
|
|
#
|
|
|
|
# Supported Compilers:
|
|
|
|
#
|
|
|
|
# Makefile.VC4: Microsoft Visual C++ 4.0 and above
|
|
|
|
# Makefile.BC5: Borland C++ 5.x
|
1998-05-08 20:45:06 +04:00
|
|
|
# Makefile.MIN: MinGW
|
|
|
|
# Makefile.RSX: RSX
|
1998-04-09 06:21:49 +04:00
|
|
|
|
|
|
|
# ---- Directories
|
|
|
|
MC_PC_DIR=.
|
|
|
|
MC_SRC_DIR=../src
|
|
|
|
VFS_DIR=../vfs
|
|
|
|
MCEDIT_SRC_DIR=../edit
|
1999-01-08 23:38:27 +03:00
|
|
|
MCGTKEDIT_SRC_DIR=../edit
|
1998-04-09 06:21:49 +04:00
|
|
|
MCEDIT_OBJS_DIR=$(OBJS_DIR)/edit
|
|
|
|
SLANG_SRC_DIR=../slang
|
|
|
|
SLANG_OBJS_DIR=$(OBJS_DIR)/slang
|
|
|
|
MC_EXE=$(OBJS_DIR)/mc.exe
|
|
|
|
|
|
|
|
# --- Midnight Defines
|
2002-01-22 04:46:50 +03:00
|
|
|
COMMON_DEFINES=-DMC_NT $(SPECIFIC_DEFINES)
|
1998-04-09 06:21:49 +04:00
|
|
|
MC_DEFINES=$(COMMON_DEFINES) -DHAVE_CONFIG_H
|
1998-05-12 20:20:06 +04:00
|
|
|
MC_INCLUDES=-I$(MC_PC_DIR) -I$(SLANG_SRC_DIR)
|
1998-04-09 06:21:49 +04:00
|
|
|
SLANG_DEFINES=$(COMMON_DEFINES)
|
|
|
|
SLANG_INCLUDES=-I$(MC_PC_DIR) -I$(SLANG_SRC_DIR)
|
|
|
|
MCEDIT_DEFINES=$(COMMON_DEFINES) -DHAVE_CONFIG_H
|
1998-05-12 20:20:06 +04:00
|
|
|
MCEDIT_INCLUDES=-I$(MC_PC_DIR) -I$(SLANG_SRC_DIR)
|
1998-04-09 06:21:49 +04:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
all: object-dirs mc
|
|
|
|
object-dirs: $(OBJS_DIR) $(SLANG_OBJS_DIR) $(MCEDIT_OBJS_DIR)
|
|
|
|
|
|
|
|
mc: $(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_PC_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)$@ $<
|
|
|
|
|
1999-09-01 20:13:33 +04:00
|
|
|
$(MCEDIT_OBJS_DIR)/%.$(OBJ_SUFFIX): $(MCGTKEDIT_SRC_DIR)/%.c
|
1999-01-08 23:38:27 +03:00
|
|
|
$(CC) -I$(MCGTKEDIT_SRC_DIR) -I$(MCEDIT_SRC_DIR) -I$(MCEDIT_SRC_DIR)/.. $(MCEDIT_CFLAGS) $(OBJ_PLACE)$@ $<
|
|
|
|
|
1998-04-09 06:21:49 +04:00
|
|
|
MC_SRCS= \
|
1999-01-08 23:38:27 +03:00
|
|
|
terms.c \
|
|
|
|
user.c \
|
|
|
|
file.c \
|
|
|
|
filegui.c \
|
|
|
|
filenot.c \
|
|
|
|
findme.c \
|
|
|
|
listmode.c \
|
|
|
|
cmd.c \
|
|
|
|
command.c \
|
|
|
|
help.c \
|
|
|
|
menu.c \
|
|
|
|
view.c \
|
|
|
|
dir.c \
|
|
|
|
info.c \
|
|
|
|
widget.c \
|
|
|
|
option.c \
|
|
|
|
dlg.c \
|
|
|
|
panelize.c \
|
|
|
|
profile.c \
|
|
|
|
util.c \
|
|
|
|
dialog.c \
|
|
|
|
ext.c \
|
|
|
|
color.c \
|
|
|
|
layout.c \
|
|
|
|
setup.c \
|
|
|
|
regex.c \
|
|
|
|
hotlist.c \
|
|
|
|
tree.c \
|
|
|
|
win.c \
|
|
|
|
complete.c \
|
|
|
|
find.c \
|
|
|
|
wtools.c \
|
|
|
|
boxes.c \
|
|
|
|
background.c \
|
|
|
|
main.c \
|
|
|
|
popt.c \
|
|
|
|
text.c \
|
1998-04-09 06:21:49 +04:00
|
|
|
screen.c
|
|
|
|
|
|
|
|
PC_SRCS= \
|
1999-01-08 23:38:27 +03:00
|
|
|
chmod.c \
|
|
|
|
cons_nt.c \
|
2002-01-22 04:46:50 +03:00
|
|
|
drive.c \
|
1999-01-08 23:38:27 +03:00
|
|
|
dirent_nt.c \
|
|
|
|
key_nt.c \
|
2002-01-22 04:46:50 +03:00
|
|
|
slint_pc.c \
|
1999-01-08 23:38:27 +03:00
|
|
|
util_win32.c \
|
|
|
|
util_winnt.c \
|
1998-04-09 06:21:49 +04:00
|
|
|
util_nt.c
|
|
|
|
|
1999-01-08 23:38:27 +03:00
|
|
|
SLANG_SRCS= \
|
|
|
|
slerr.c \
|
|
|
|
slgetkey.c \
|
|
|
|
slsmg.c \
|
|
|
|
slvideo.c \
|
2002-01-22 04:46:50 +03:00
|
|
|
slw32tty.c
|
1998-04-09 06:21:49 +04:00
|
|
|
|
1999-01-08 23:38:27 +03:00
|
|
|
MCEDIT_SRCS= \
|
|
|
|
edit.c \
|
|
|
|
editcmd.c \
|
|
|
|
editdraw.c \
|
|
|
|
editmenu.c \
|
|
|
|
editoptions.c \
|
|
|
|
editwidget.c \
|
|
|
|
syntax.c \
|
1998-04-09 06:21:49 +04:00
|
|
|
wordproc.c
|
|
|
|
|
2002-01-22 04:46:50 +03:00
|
|
|
SRCS=$(MC_SRCS) $(PC_SRCS) $(EXTRA_MC_SRCS)
|
1998-04-09 06:21:49 +04:00
|
|
|
|
|
|
|
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
|
1998-05-08 13:58:53 +04:00
|
|
|
|
|
|
|
ifndef RES_SUFFIX
|
|
|
|
RES_SUFFIX=res
|
|
|
|
endif # RES_SUFFIX
|
|
|
|
|
|
|
|
MC_RES=$(OBJS_DIR)/mc.$(RES_SUFFIX)
|
|
|
|
|
2001-06-11 19:39:57 +04:00
|
|
|
$(MC_RES): $(MC_PC_DIR)/mc.rc $(MC_PC_DIR)/mc_nt.ico $(MC_PC_DIR)/config.h VERSION
|
1998-05-08 13:58:53 +04:00
|
|
|
$(RSC) $(RES_PLACE)$(MC_RES) $(RC_DEFINES) $(MC_PC_DIR)/mc.rc
|
|
|
|
|
1998-04-09 06:21:49 +04:00
|
|
|
else
|
|
|
|
MC_RES=
|
1998-05-08 13:58:53 +04:00
|
|
|
endif # !RSC
|
2001-06-11 19:39:57 +04:00
|
|
|
|
|
|
|
VERSION: ../configure.in
|
|
|
|
sed -n -e 's/^AM_INIT_AUTOMAKE([^,]*,[ []*\([0-9A-Za-z.-_]*\).*$$/#define VERSION "\1"/p' $< > $@
|