Added missing initialization (Arne Førlie).
[nedit.git] / makefiles / Makefile.os2
blobe4d8e061fd1ff10a345a0264bbb499fe2154913e
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 
12 default: init build
14 init: util/Makefile.os2 source/Makefile.os2
16 util/Makefile.os2 source/Makefile.os2: makefiles/Makefile.os2
17         cp $< $@
19 build:
20         cd util   && $(MAKE) -f Makefile.os2 all BUILD=1
21         cd source && $(MAKE) -f Makefile.os2 all BUILD=1
22         
23 clean-all:
24         cd util   && $(MAKE) -f Makefile.os2 clean-local
25         cd source && $(MAKE) -f Makefile.os2 clean-local
27 doclean: init
28         cd util   && $(MAKE) -f Makefile.os2 clean-local
29         cd source && $(MAKE) -f Makefile.os2 clean-local
31 CC=gcc
32 AR=ar
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)
45 ARFLAGS=-urs
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
51 ifeq ($(BUILD),1)
52 include Makefile.common
53 endif
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
64 CFLAGS2=$(CFLAGS)
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
70         del nedit
71         $(CC) -o $@ $^ $(LIBS2) -Zomf
73 nc.exe: nc.obj ..\util\libNUtil.lib
74         del nc
75         $(CC) -o $@ $^ $(LIBS2) -Zomf
77 libNUtil.lib: ..\util\libNUtil.a
78         emxomf $<
80 %.obj: %.o
81         emxomf $<
83 %.o: %.c
84         $(CC) $(CFLAGS) -c -o $@ $<
86 %.obj: %.c
87         $(CC) -Zomf $(CFLAGS2) -c -o $@ $<
89 clean-local:
90         rm -f *.o *.a *.lib
91         rm -f *.exe core
93 verify_config: