1include ../Makefile.conf 2 3 4MODULES=SComponent.o SBorder.o SPanel.o \ 5 SFrame.o STextView.o STextEdit.o SCaret.o SEditorIF.o SEditor.o \ 6 STextEditLS.o SUndo.o SYuditInput.o SLayout.o SUniPrint.o \ 7 SSlider.o SIcon.o SOpaqueLabel.o SButton.o SLabel.o \ 8 STextList.o SListBox.o SIconFactory.o \ 9 SDialog.o STextDialog.o SFileDialog.o \ 10 STextTable.o SDrawing.o SFreeHand.o \ 11 SPasswordDialog.o 12 13 14TARGETDIR= 15TARGETOBJS= 16 17ifeq ($(SPLATFORM),WINDOWS) 18OBJS=$(subst .o,.obj,$(MODULES)) $(subst .o,.obj,$(TARGETOBJS)) 19TARGET=swidget.lib 20else 21OBJS=$(MODULES) $(TARGETOBJS) 22TARGET=libswidget.a 23endif 24 25 26all: $(TARGET) 27 28# 29# The cl drops its lib here 30# 31swidget.lib: $(OBJS) 32 $(AR)$@ $(subst swin32/,,$(OBJS)) 33 34libswidget.a: $(OBJS) 35 $(AR) $@ $(OBJS) 36 $(RANLIB) $@ 37 38%.o:%.cpp 39 $(CXX) -c $(CPPFLAGS) $(subst .o,.cpp,$@) 40 41%.obj:%.cpp 42 $(CXX) -c $(CPPFLAGS) $(subst .obj,.cpp,$@) 43 44depend: 45 $(CXX) -M $(CPPFLAGS) $(patsubst %.o,%.cpp,$(OBJS)) > .depend 46 47clean: 48 rm -f *.o *.obj *.o $(TARGET) 49 50install: 51 52ifeq (.depend, $(wildcard .depend)) 53include .depend 54endif 55