1include ../Makefile.conf 2 3MODULES=SAwt.o SGPrimitive.o SGEngine.o SWindow.o SColor.o \ 4 SImage.o SPen.o SCanvas.o SRedrawEvent.o \ 5 SFont.o SFontImpl.o SFontTTF.o SFontOTF.o SFontBDF.o SUniFont.o \ 6 SFontFB.o SFontNative.o SPostscript.o \ 7 SPrinter.o SAccelerator.o SScriptProcessor.o \ 8 SSyntaxColors.o SFontCFF.o 9 10TARGETDIR= 11TARGETOBJS= 12 13ifeq ($(SWINDOWS),X11) 14TARGETDIR:=$(TARGETDIR) SX11 15ifeq ($(USE_X11),-DUSE_X11=1) 16TARGETOBJS:=sx11/SX11Impl.o sx11/SX11Window.o \ 17 sx11/SX11Color.o sx11/SX11Font.o \ 18 sx11/SXInputMethod.o sx11/SXEventHandler.o 19endif 20CPPFLAGS:=$(CPPFLAGS) $(SWINDOW_FLAGS) 21endif 22 23ifeq ($(SWINDOWS),WIN32) 24TARGETDIR:=$(TARGETDIR) swin32 25TARGETOBJS:=SWin32.o 26CPPFLAGS:=$(CPPFLAGS) 27endif 28 29ifeq ($(SWINDOWS),OSX) 30TARGETDIR:=$(TARGETDIR) sosx 31TARGETOBJS:=sosx/SOSX.o \ 32 sosx/SCocoa.o \ 33 sosx/SCocoaInput.o \ 34 sosx/SKeyboard.o \ 35 sosx/SEventOSX.o 36CPPFLAGS:=$(CPPFLAGS) -DUSE_OSX=1 37endif 38 39ifeq ($(SPLATFORM),WINDOWS) 40OBJS=$(subst .o,.obj,$(MODULES)) $(subst .o,.obj,$(TARGETOBJS)) 41#OBJS:=$(subst /,\,$(OBJS)) 42TARGET=swindow.lib 43else 44OBJS=$(MODULES) $(TARGETOBJS) 45TARGET=libswindow.a 46endif 47 48 49all: $(TARGET) 50 51# 52# The cl drops its lib here 53# 54swindow.lib: $(OBJS) 55 $(AR)$@ $(subst swin32/,,$(OBJS)) 56 57libswindow.a: $(OBJS) 58 $(AR) $@ $(OBJS) 59 $(RANLIB) $@ 60 61sx11/%.o:sx11/%.cpp 62 $(CXX) -c -o $@ $(HAVE_LOCALE) $(NEED_SET_IM_VALUES_PROTO) $(HAVE_SET_IM_VALUES) $(CPPFLAGS) $(patsubst %.o,%.cpp,$@) 63 64sosx/%.o:sosx/%.cpp 65 $(CXX) -c -o $@ $(CPPFLAGS) $(patsubst %.o,%.cpp,$@) 66 67# -lobjc -lgnustep-base 68sosx/%.o:sosx/%.mm 69 $(CXX) -c -o $@ $(CPPFLAGS) $(patsubst %.o,%.mm,$@) 70 71%.o:%.cpp 72 $(CXX) -c $(CPPFLAGS) $(subst .o,.cpp,$@) 73 74%.obj:%.cpp 75 $(CXX) -c $(CPPFLAGS) $(subst .obj,.cpp,$@) 76 77%.obj:swin32/%.cpp 78 $(CXX) -c $(CPPFLAGS) $(patsubst %.obj,swin32/%.cpp,$@) 79 80depend: 81 $(CXX) -M $(CPPFLAGS) $(patsubst %.o,%.cpp,$(OBJS)) > .depend 82 83clean: 84 rm -f *.o *.obj */*.o */*.obj $(TARGET) 85 86install: 87 88ifeq (.depend, $(wildcard .depend)) 89include .depend 90endif 91