Martin Fuchs martin-fuchs@gmx.net writes:
Why did I declare a new macro $(PREINCL) and insert it into Make.rule.in ? To allow inserting the include directory <include/msvcrt> before <include>.
But why do you need that?
-IMPORTS = shell32 comdlg32 comctl32 ole32 mpr version user32 gdi32 advapi32 kernel32 +PREINCL = -I$(TOPSRCDIR)/include/msvcrt +IMPORTS = msvcrt shell32 comdlg32 comctl32 ole32 mpr version user32 gdi32 advapi32 kernel32 EXTRALIBS = -luuid
C_SRCS = \ license.c \ splitpath.c \
- unixcalls.c \ winefile.c
RC_SRCS = rsrc.rc @@ -22,5 +24,11 @@ winefile.ico
@MAKE_PROG_RULES@
+UNIX_INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include +UNIX_CFLAGS = $(UNIX_INCLUDES) $(DEFS) $(DLLFLAGS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS)
+unixcalls.o: unixcalls.c
- $(CC) -c $(UNIX_CFLAGS) -o $@ $<
This stuff is getting uglier all the time. Please consider converting to Unicode properly and getting rid of all the TCHAR crap. I know the goal is to show how to use it, but at this point all it does is demonstrate why using TCHAR is a really bad idea. The way this is going pretty soon there will be more #ifdefs in winefile than in all the rest of the Wine codebase.