aboutsummaryrefslogtreecommitdiff
path: root/makefile.after
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-12 18:20:04 +0000
committermarha <marha@users.sourceforge.net>2009-07-12 18:20:04 +0000
commitda8fe31a7ba4acf109097d5696ad0145b991cdfd (patch)
tree1c74d6f075702a73e557872f2a6f020ea4eb5432 /makefile.after
parent6590f805a12779909cb8504c230fa367148fe38c (diff)
parent529dcfd0858d75cb3c87c73cb0f81dd20bbb9230 (diff)
downloadvcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.tar.gz
vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.tar.bz2
vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.zip
Changes for VC compilation
Diffstat (limited to 'makefile.after')
-rw-r--r--makefile.after76
1 files changed, 76 insertions, 0 deletions
diff --git a/makefile.after b/makefile.after
new file mode 100644
index 000000000..ae4fd1eb4
--- /dev/null
+++ b/makefile.after
@@ -0,0 +1,76 @@
+OBJS+=$(CSRCS:%.c=$(OBJDIR)$/%$(OBJEXT))
+OBJS:=$(OBJS:%.cc=$(OBJDIR)$/%$(OBJEXT))
+
+RESOBJS:=$(RESOURCES:%.rc=$(OBJDIR)$/%.res)
+
+MANIFESTFILE:=$(MHMAKECONF)\runtime.manifest
+
+### Static library stuff ###
+ifdef LIBRARY
+LIBRARY_DIR := $(LIBRARY:%=$(OBJDIR)\%.lib)
+PDB := $(LIBRARY_DIR:%.lib=%.pdb)
+
+all: $(LIBRARY_DIR)
+
+$(LIBRARY_DIR) : $(OBJS)
+ $(AR) /OUT:$(relpath $@) $(OBJS)
+
+endif # End static library stuff
+
+### WINAPP stuff ###
+ifdef WINAPP
+EXE := $(WINAPP:%=$(OBJDIR)\%.exe)
+PDB := $(EXE:%.exe=%.pdb)
+
+#LINKFLAGS += /SUBSYSTEM:WINDOWS
+
+all: $(EXE)
+
+$(EXE) : $(OBJS) $(INCLUDELIBFILES) $(RESOBJS) $(MANIFESTFILE)
+ $(LINK) $(LINKFLAGS) /MANIFEST:NO /OUT:$(relpath $@) $(INCLUDELIBFILES) $(SYSTEMLIBS) $(LINKLIBS) $(OBJS) $(RESOBJS)
+ mt -nologo -manifest $(MANIFESTFILE) -outputresource:$(relpath $@);\#1
+
+endif # End WINAPP stuff
+
+ifeq ($(DEBUG),1)
+COMMONCFLAGS += $(DEFINES:%=-D%) $(INCLUDES:%=-I"%") -Fo"$(relpath $@)" -Fd"$(PDB)" "$<"
+else
+COMMONCFLAGS += $(DEFINES:%=-D%) $(INCLUDES:%=-I"%") -Fo"$(relpath $@)" "$<"
+PDB= # There is no PDB file generated in a release build
+endif
+
+.PHONY: all cleanall clean clean$(OBJDIRPREFIX)
+
+### Implicit rules ###
+CREATEDIR=if not isdir $@ mkdir /s $@
+
+$(OBJDIR) :
+ $(CREATEDIR)
+
+ifneq ($(OBJDIRPREFIX),)
+clean: clean$(OBJDIRPREFIX)
+endif
+
+clean$(OBJDIRPREFIX):
+ del -e $(OBJDIR)
+
+$(OBJDIR)\%$(OBJEXT) : %.c
+ $(CC) $(CCFLAGS) $(COMMONCFLAGS)
+
+$(OBJDIR)\%$(OBJEXT) : %.cc
+ $(CC) $(CCFLAGS) /EHsc $(COMMONCFLAGS)
+
+$(OBJDIR)\%.res : %.rc
+ $(RC) $(RCFLAGS) $(RCDEFINES:%=-d "%") $(RCINCLUDES:%=-i "%") -Fo"$(relpath $@)" "$<"
+
+BDFTOPCF= $(MHMAKECONF)\bdftopcf\$(OBJDIR)\bdftopcf.exe
+load_makefile $(MHMAKECONF)\bdftopcf\makefile MAKESERVER=0 DEBUG=$(DEBUG)
+
+$(DESTDIR)\%.pcf.gz: %.bdf
+ @del -e $@
+ $(BDFTOPCF) -t $< | gzip > $@
+
+$(DESTDIR)\%.enc.gz: %.enc
+ gzip -c < $< > $@
+
+