Mercurial > dwindows
view Makefile.in @ 461:12ba7e744560
Fixes timer problems on Windows, however this may break Win95 support.
The Microsoft documentation is contradictory regarding this and I don't
have a copy of Win95 to test on here.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 09 Jul 2003 07:20:17 +0000 |
parents | e99cd6e45c0b |
children | f6de197ecbe9 |
line wrap: on
line source
srcdir=@srcdir@ CC = @CC@ CCFLAGS = @CFLAGS@ -g -O2 -fPIC -Wall -D@DW_DEFINE@ -DBUILD_DLL -DDW_RESOURCES LFLAGS = @LIBS@ INSTALL = @INSTALL@ DW_SRC = @DW_SRC@ INCPATH = -I.. -I. -I$(srcdir) DESTDIR = ./lib/ MLFLAGS = -L$(DESTDIR) TARGET = dw SRCS = $(srcdir)/$(DW_SRC)/dw.c OBJECTS = dw.o SRCS2 = $(srcdir)compat.c OBJECTS2= compat.o TARGET2 = dwcompat VER_MAJ = 1 VER_MIN = 0 SOSUFFIX= @SOSUFFIX@ PREFIX = @prefix@ SRCDIR=dwindows-$(VER_MAJ).$(VER_MIN) #.SUFFIXES: .c .h #.c.o: # $(CC) -c $(CCFLAGS) $(INCPATH) -o $@ $< # Link flags shared objects SYSCONF_LFLAGS_SHOBJ = @SHAREDFLAG@ # Linking shared libraries # - Build the $(TARGET) library, eg. lib$(TARGET).so.0.0 # - Place target in $(DESTDIR) - which has a trailing / # - Usually needs to incorporate $(VER_MAJ) and $(VER_MIN) # SYSCONF_LINK_SHLIB = gcc SYSCONF_LINK_TARGET_SHARED = lib$(TARGET).$(SOSUFFIX).$(VER_MAJ).$(VER_MIN) SYSCONF_LINK_LIB_SHARED = $(SYSCONF_LINK_SHLIB) $(SYSCONF_LFLAGS_SHOBJ) \ -o $(SYSCONF_LINK_TARGET_SHARED) \ $(OBJECTS) $(LFLAGS); \ mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \ cd $(DESTDIR); \ rm -f lib$(TARGET).$(SOSUFFIX) lib$(TARGET).$(SOSUFFIX).$(VER_MAJ); \ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).$(SOSUFFIX); \ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).$(SOSUFFIX).$(VER_MAJ) SYSCONF_LINK_TARGET_SHARED2 = lib$(TARGET2).$(SOSUFFIX).$(VER_MAJ).$(VER_MIN) SYSCONF_LINK_LIB_SHARED2 = $(SYSCONF_LINK_SHLIB) $(SYSCONF_LFLAGS_SHOBJ) \ -o $(SYSCONF_LINK_TARGET_SHARED2) \ $(OBJECTS2) $(LFLAGS); \ mv $(SYSCONF_LINK_TARGET_SHARED2) $(DESTDIR); \ cd $(DESTDIR); \ rm -f lib$(TARGET2).$(SOSUFFIX) lib$(TARGET2).$(SOSUFFIX).$(VER_MAJ); \ ln -s $(SYSCONF_LINK_TARGET_SHARED2) lib$(TARGET2).$(SOSUFFIX); \ ln -s $(SYSCONF_LINK_TARGET_SHARED2) lib$(TARGET2).$(SOSUFFIX).$(VER_MAJ) # Linking static libraries # - Build the $(TARGET) library, eg. lib$(TARGET).a # - Place target in $(DESTDIR) - which has a trailing / # SYSCONF_AR = ar cqs SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a SYSCONF_LINK_LIB_STATIC = rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \ $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) ####### Build rules SYSCONF_LINK_TARGET = $(SYSCONF_LINK_TARGET_SHARED) SYSCONF_LINK_LIB = $(SYSCONF_LINK_LIB_SHARED) SYSCONF_LINK_TARGET2 = $(SYSCONF_LINK_TARGET_SHARED2) SYSCONF_LINK_LIB2 = $(SYSCONF_LINK_LIB_SHARED2) all: $(SYSCONF_LINK_TARGET) $(SYSCONF_LINK_TARGET2) dwtest install: $(INSTALL) $(srcdir)/dw.h $(PREFIX)/include; \ $(INSTALL) $(srcdir)/compat.h $(PREFIX)/include; \ $(INSTALL) dw-config $(PREFIX)/bin; \ cd $(DESTDIR); \ $(INSTALL) $(SYSCONF_LINK_TARGET) $(PREFIX)/lib; \ $(INSTALL) $(SYSCONF_LINK_TARGET2) $(PREFIX)/lib; \ cd $(PREFIX)/lib; \ rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ); \ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).$(SOSUFFIX); \ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).$(SOSUFFIX).$(VER_MAJ); \ rm -f lib$(TARGET2).$(SOSUFFIX) lib$(TARGET2).$(SOSUFFIX).$(VER_MAJ); \ ln -s $(SYSCONF_LINK_TARGET_SHARED2) lib$(TARGET2).$(SOSUFFIX); \ ln -s $(SYSCONF_LINK_TARGET_SHARED2) lib$(TARGET2).$(SOSUFFIX).$(VER_MAJ) clean: rm -f *.so rm -f *.o rm -f *~ rm -f *.a rm -f $(DW_SRC)/*.o $(DESTDIR): mkdir $(DESTDIR) $(SYSCONF_LINK_TARGET2): $(OBJECTS2) $(DESTDIR) $(SYSCONF_LINK_LIB2) $(SYSCONF_LINK_TARGET): $(OBJECTS) $(DESTDIR) $(SYSCONF_LINK_LIB) dw.o: $(srcdir)/$(DW_SRC)/dw.c $(CC) -c $(INCPATH) $(CCFLAGS) -o $@ $(srcdir)/$(DW_SRC)/dw.c compat.o: $(srcdir)/compat.c $(CC) -c $(INCPATH) $(CCFLAGS) -o $@ $(srcdir)/compat.c ci.o: $(srcdir)/ci.c $(CC) -c $(INCPATH) $(CCFLAGS) -o $@ $(srcdir)/ci.c dwtest.o: $(srcdir)/dwtest.c $(CC) -c $(INCPATH) $(CCFLAGS) -o $@ $(srcdir)/dwtest.c ci: ci.o $(CC) -o ci ci.o -L$(PREFIX)/lib -ldw -ldwcompat $(LFLAGS) dwtest: dwtest.o $(CC) -o dwtest dwtest.o -L$(PREFIX)/lib -ldw -ldwcompat $(LFLAGS) chmod +x mac/finishup.sh mac/finishup.sh zip: zip dwindows$(VER_MAJ)$(VER_MIN).zip $(srcdir)/license.txt $(srcdir)/makefile.* $(srcdir)/readme $(srcdir)/*.c $(srcdir)/dw.h $(srcdir)/compat.h \ $(srcdir)/*.def $(srcdir)/install.sh $(srcdir)/*.in $(srcdir)/configure \ $(srcdir)/ac*.m4 \ $(srcdir)/gtk/*.c $(srcdir)/win/*.c $(srcdir)/os2/*.c \ $(srcdir)/gtk/*.xpm $(srcdir)/win/*.ico $(srcdir)/os2/*.ico \ $(srcdir)/platform/*.h dist: (cd $(srcdir)/..;tar -cvf - $(SRCDIR)/license.txt $(SRCDIR)/makefile.* $(SRCDIR)/readme $(SRCDIR)/*.c $(SRCDIR)/dw.h $(SRCDIR)/compat.h \ $(SRCDIR)/*.def $(SRCDIR)/install.sh $(SRCDIR)/*.in $(SRCDIR)/configure \ $(SRCDIR)/ac*.m4 \ $(SRCDIR)/gtk/*.c $(SRCDIR)/win/*.c $(SRCDIR)/os2/*.c \ $(SRCDIR)/gtk/*.xpm $(SRCDIR)/win/*.ico $(SRCDIR)/os2/*.ico \ $(SRCDIR)/platform/*.h | gzip > dwindows-$(VER_MAJ).$(VER_MIN).tar.gz )