You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
221 lines
5.0 KiB
Plaintext
221 lines
5.0 KiB
Plaintext
# Common elements for the Watcom makefiles
|
|
|
|
!ifeq TARGET dos
|
|
!ifneq MODEL f
|
|
TARGET16 = 1
|
|
!endif
|
|
!endif
|
|
|
|
!ifdef __UNIX__
|
|
DEL = rm -f
|
|
COPY = cp
|
|
!else
|
|
DEL = del
|
|
COPY = copy
|
|
!endif
|
|
|
|
!ifeq TARGET linux
|
|
!else
|
|
E = .exe
|
|
!endif
|
|
|
|
.EXTENSIONS :
|
|
!ifeq TARGET linux
|
|
.EXTENSIONS : . .lib .obj .h .c
|
|
!else
|
|
.EXTENSIONS : $(E) .dll .lib .res .obj .rc .h .c
|
|
!endif
|
|
|
|
!ifdef TARGET16
|
|
CC = *wcc
|
|
!else
|
|
CC = *wcc386
|
|
MODEL = f
|
|
!endif
|
|
|
|
LIBEXE = *wlib -q -n -b -c -t -pa
|
|
|
|
LINK = *wlink
|
|
|
|
RC = *wrc
|
|
|
|
!ifdef DLL
|
|
cflags_dll_nt = -bd
|
|
cflags_dll_os2 = -bd -DPDC_DLL_BUILD
|
|
cflags_dll_imp_nt = -DPDC_DLL_BUILD
|
|
!endif
|
|
|
|
CFLAGS += -bt=$(TARGET) -m$(MODEL) -wx -we -zq -i=$(PDCURSES_SRCDIR)
|
|
!ifeq DEBUG Y
|
|
CFLAGS += -d2 -DDEBUG -DPDCDEBUG
|
|
!ifdef TARGET16
|
|
CFLAGS += -hw
|
|
!else
|
|
CFLAGS += -hd
|
|
!endif
|
|
!else
|
|
CFLAGS += -s -oneatx -DNDEBUG
|
|
!endif
|
|
!ifdef CHTYPE_32
|
|
CFLAGS += -DCHTYPE_32
|
|
!endif
|
|
!ifeq WIDE Y
|
|
CFLAGS += -DPDC_WIDE
|
|
!endif
|
|
!ifeq UTF8 Y
|
|
CFLAGS += -DPDC_FORCE_UTF8
|
|
!endif
|
|
!ifeq TARGET dos
|
|
CFLAGS += -DDOS
|
|
!endif
|
|
!ifdef cflags_dll_$(TARGET)
|
|
CFLAGS += $(cflags_dll_imp_$(TARGET))
|
|
DLL_CFLAGS_ = $(cflags_dll_$(TARGET))
|
|
!endif
|
|
|
|
!ifdef DLL
|
|
ltarget_dll_nt = nt_dll
|
|
ltarget_dll_os2 = os2v2_dll
|
|
!endif
|
|
|
|
LDFLAGS = op q, noext
|
|
!ifeq DEBUG Y
|
|
!ifdef TARGET16
|
|
LDFLAGS += debug watcom all
|
|
!else
|
|
LDFLAGS += debug dwarf all
|
|
!endif
|
|
!endif
|
|
|
|
srcdir = $(PDCURSES_SRCDIR)/pdcurses
|
|
demodir = $(PDCURSES_SRCDIR)/demos
|
|
testdir = $(PDCURSES_SRCDIR)/tests
|
|
|
|
LIBOBJS = addch.obj addchstr.obj addstr.obj attr.obj beep.obj bkgd.obj &
|
|
border.obj clear.obj color.obj delch.obj deleteln.obj &
|
|
getch.obj getstr.obj getyx.obj inch.obj inchstr.obj initscr.obj inopts.obj &
|
|
insch.obj insstr.obj instr.obj kernel.obj keyname.obj mouse.obj move.obj &
|
|
outopts.obj overlay.obj pad.obj panel.obj printw.obj refresh.obj &
|
|
scanw.obj scr_dump.obj scroll.obj slk.obj termattr.obj terminfo.obj &
|
|
touch.obj util.obj window.obj debug.obj
|
|
|
|
PDCOBJS = pdcclip.obj pdcdisp.obj pdcgetsc.obj pdckbd.obj pdcscrn.obj &
|
|
pdcsetsc.obj pdcutil.obj
|
|
|
|
DEMOS = calendar$(E) firework$(E) init_col$(E) mbrot$(E) newtest$(E) &
|
|
ozdemo$(E) picsview$(E) ptest$(E) rain$(E) speed$(E) test_pan$(E) &
|
|
testcurs$(E) tuidemo$(E) widetest$(E) worm$(E) xmas$(E)
|
|
|
|
TESTS = brk_test$(E) del_test$(E) focus$(E) ins_del$(E) keytest$(E) &
|
|
opaque$(E) restart$(E) ripoff$(E) show_col$(E)
|
|
|
|
|
|
PDCNAME = pdcurses
|
|
|
|
!ifdef __LOADDLL__
|
|
! loaddll wcc wccd
|
|
! loaddll wcc386 wccd386
|
|
! loaddll wlink wlinkd
|
|
! loaddll wlib wlibd
|
|
!endif
|
|
|
|
all: $(PDCNAME).lib
|
|
|
|
.c: $(srcdir);$(PDCURSES_SRCDIR)/$(osdir);$(demodir);$(testdir)
|
|
.c.obj: .autodepend
|
|
!ifeq TARGET dos
|
|
@set INCLUDE=$(%WATCOM)/h
|
|
!else ifeq TARGET os2
|
|
@set INCLUDE=$(%WATCOM)/h;$(%WATCOM)/h/os2
|
|
!else ifeq TARGET nt
|
|
@set INCLUDE=$(%WATCOM)/h;$(%WATCOM)/h/nt
|
|
!else ifeq TARGET linux
|
|
@set INCLUDE=$(%WATCOM)/lh
|
|
!endif
|
|
$(CC) $(CFLAGS) $(DLL_CFLAGS_$(build_dll_$^&)) -fo=$@ $<
|
|
|
|
!ifeq TARGET linux
|
|
.obj.:
|
|
!else
|
|
.obj$(E):
|
|
!endif
|
|
$(LINK) $(LDFLAGS) name $@ sys $(LTARGET) file $*.obj lib $(PDCNAME).lib $(ADDED_LIBS)
|
|
|
|
build_dll_calendar = no
|
|
build_dll_firework = no
|
|
build_dll_init_col = no
|
|
build_dll_mbrot = no
|
|
build_dll_newtest = no
|
|
build_dll_ozdemo = no
|
|
build_dll_picsview = no
|
|
build_dll_ptest = no
|
|
build_dll_rain = no
|
|
build_dll_test_pan = no
|
|
build_dll_testcurs = no
|
|
build_dll_tui = no
|
|
build_dll_tuidemo = no
|
|
build_dll_widetest = no
|
|
build_dll_worm = no
|
|
build_dll_xmas = no
|
|
|
|
calendar$(E): calendar.obj $(PDCNAME).lib
|
|
firework$(E): firework.obj $(PDCNAME).lib
|
|
init_col$(E): init_col.obj $(PDCNAME).lib
|
|
mbrot$(E): mbrot.obj $(PDCNAME).lib
|
|
newtest$(E): newtest.obj $(PDCNAME).lib
|
|
ozdemo$(E): ozdemo.obj $(PDCNAME).lib
|
|
picsview$(E): picsview.obj $(PDCNAME).lib
|
|
ptest$(E): ptest.obj $(PDCNAME).lib
|
|
rain$(E): rain.obj $(PDCNAME).lib
|
|
testcurs$(E): testcurs.obj $(PDCNAME).lib
|
|
test_pan$(E): test_pan.obj $(PDCNAME).lib
|
|
widetest$(E): widetest.obj $(PDCNAME).lib
|
|
worm$(E): worm.obj $(PDCNAME).lib
|
|
xmas$(E): xmas.obj $(PDCNAME).lib
|
|
|
|
tuidemo$(E): tuidemo.obj tui.obj $(PDCNAME).lib
|
|
$(LINK) $(LDFLAGS) name $@ sys $(LTARGET) file {tuidemo.obj tui.obj} lib $(PDCNAME).lib $(ADDED_LIBS)
|
|
|
|
!ifdef ltarget_dll_$(TARGET)
|
|
version_res_nt = $(PDCNAME).res
|
|
|
|
.rc: $(PDCURSES_SRCDIR)/common
|
|
.rc.res:
|
|
!ifeq TARGET nt
|
|
@set INCLUDE=$(%WATCOM)/h;$(%WATCOM)/h/nt
|
|
!endif
|
|
$(RC) -r -bt=$(TARGET) $< -fo=$@
|
|
!endif
|
|
|
|
$(PDCNAME).lbc : $(LIBOBJS) $(PDCOBJS) $(version_res_$(TARGET))
|
|
!ifdef ltarget_dll_$(TARGET)
|
|
$(LINK) $(LDFLAGS) name $(PDCNAME).dll sys $(ltarget_dll_$(TARGET)) opt impfile=$@ file {$(LIBOBJS) $(PDCOBJS)} $(ADDED_LIBS_FOR_DLL)
|
|
!ifdef version_res_$(TARGET)
|
|
$(RC) -k -bt=$(TARGET) $(version_res_$(TARGET)) $(PDCNAME).dll
|
|
!endif
|
|
!else
|
|
%write $@ $(LIBOBJS) $(PDCOBJS)
|
|
!endif
|
|
|
|
$(PDCNAME).lib : $(PDCNAME).lbc
|
|
$(LIBEXE) $@ @$<
|
|
!ifdef EXTRA_LIB_CMD
|
|
$(EXTRA_LIB_CMD)
|
|
!endif
|
|
|
|
demos: $(DEMOS)
|
|
|
|
tests: $(TESTS)
|
|
|
|
dist: .symbolic
|
|
|
|
clean: .symbolic
|
|
@if exist *.obj -$(DEL) *.obj
|
|
@if exist *.lib -$(DEL) *.lib
|
|
@if exist *.dll -$(DEL) *.dll
|
|
@for %f in ($(DEMOS)) do @if exist %f -$(DEL) %f
|
|
@if exist *.err -$(DEL) *.err
|
|
@if exist *.map -$(DEL) *.map
|
|
@if exist *.res -$(DEL) *.res
|
|
@if exist *.lbc -$(DEL) *.lbc
|