1 # $Id: Makefile.os2,v 1.14 2003/05/20 00:27:56 n8gray Exp $
3 # Makefile for NEdit with XFree86 OS/2
5 # From the toplevel directory just call
6 # make -f makefiles/Makefile.os2
9 .PHONY: init default clean
11 # toplevel default target
14 init: util/Makefile.os2 source/Makefile.os2
16 util/Makefile.os2 source/Makefile.os2: makefiles/Makefile.os2
20 cd util && $(MAKE) -f Makefile.os2 all BUILD=1
21 cd source && $(MAKE) -f Makefile.os2 all BUILD=1
24 cd util && $(MAKE) -f Makefile.os2 clean-local
25 cd source && $(MAKE) -f Makefile.os2 clean-local
28 cd util && $(MAKE) -f Makefile.os2 clean-local
29 cd source && $(MAKE) -f Makefile.os2 clean-local
34 # For editres, add -DEDITRES to CFLAGS and -lXmu to LIBS
36 # To evaluate an alternative layout for the Replace/Find dialog, add
37 # -DREPLACE_SCOPE to the CFLAGS. See the README file for more information.
39 # To test if the Motif library exports the runtime version
40 # add -DHAVE__XMVERSIONSTRING to CFLAGS
42 DEFINES = -DUSE_DIRENT -DUSE_LPR_PRINT_CMD -DEDITRES -DNO_READLINK
43 CFLAGS = -g -Zmt -O5 -mpentium -Wall -Wno-unused -W \
44 -I$(X11ROOT)/XFree86/include $(DEFINES)
46 # Using LessTif's libXm
47 LIBS= -s -Zmtd -Zexe -Zbsd-signals -Zstack 0x4000 \
48 -L$(X11ROOT)/XFree86/lib -lXm -lXext -lXt -lXmu -lSM -lICE -lX11
52 include Makefile.common
56 # An alternative method to build the executables with OMF objects.
57 # Those can be debugged using sd386, and can benefit from link386
58 # features like executable compression.
59 # Usage: cd to source/ and type
60 # make -f Makefile.os2 BUILD=1 nedit.exe
62 OBJS2=$(OBJS:.o=.obj) linkdate.obj
65 LIBS2= -g -Zmt -Zcrtdll -Zbsd-signals -Zstack 0x4000 \
66 -Zlinker /PM:VIO -Zlinker /E:2 -Zlinker /DEBUG -Zmap -Zlinker /M \
67 -L$(X11ROOT)/XFree86/lib -lXm -lXext -lXt -lXmu -lSM -lICE -lX11
69 nedit.exe: $(OBJS2) ..\util\libNUtil.lib
71 $(CC) -o $@ $^ $(LIBS2) -Zomf
73 nc.exe: nc.obj ..\util\libNUtil.lib
75 $(CC) -o $@ $^ $(LIBS2) -Zomf
77 libNUtil.lib: ..\util\libNUtil.a
84 $(CC) $(CFLAGS) -c -o $@ $<
87 $(CC) -Zomf $(CFLAGS2) -c -o $@ $<