Permalink
Browse files

Fix building with makefile.win32 from Windows command prompt, not MSYS

  • Loading branch information...
1 parent 40da14b commit 08d751daf206d606176bae9cc8cd216f00a1e662 @zhekov zhekov committed with ntrel Jun 26, 2012
Showing with 17 additions and 19 deletions.
  1. +12 −14 makefile.win32
  2. +5 −5 src/makefile.win32
View
@@ -14,19 +14,17 @@
WINDRES = windres.exe
CC = gcc
CXX = g++
-CP = copy
+CP = copy /Y
RM = del
-MAKE = make
+MAKE = mingw32-make
-include localwin32.mk
-# Note: && is needed after cd because each line is executed in a different
-# shell. (cd .. is just for clarity).
all: config.h
- cd tagmanager/mio && $(MAKE) -f makefile.win32 && cd ../..
- cd tagmanager && $(MAKE) -f makefile.win32 && cd ..
- cd scintilla && $(MAKE) -f makefile.win32 && cd ..
- cd plugins && $(MAKE) -f makefile.win32 && cd ..
- cd src && $(MAKE) -f makefile.win32 && cd ..
+ $(MAKE) -C tagmanager/mio -f makefile.win32
+ $(MAKE) -C tagmanager -f makefile.win32
+ $(MAKE) -C scintilla -f makefile.win32
+ $(MAKE) -C plugins -f makefile.win32
+ $(MAKE) -C src -f makefile.win32
config.h: win32-config.h
$(CP) $< $@
@@ -39,11 +37,11 @@ clean-local:
-$(RM) geany_private.res geany.exe
clean: deps
- cd tagmanager/mio && $(MAKE) -f makefile.win32 clean && cd ../..
- cd tagmanager && $(MAKE) -f makefile.win32 clean && cd ..
- cd scintilla && $(MAKE) -f makefile.win32 clean && cd ..
- cd plugins && $(MAKE) -f makefile.win32 clean && cd ..
- cd src && $(MAKE) -f makefile.win32 clean && cd ..
+ $(MAKE) -C tagmanager/mio -f makefile.win32 clean
+ $(MAKE) -C tagmanager -f makefile.win32 clean
+ $(MAKE) -C scintilla -f makefile.win32 clean
+ $(MAKE) -C plugins -f makefile.win32 clean
+ $(MAKE) -C src -f makefile.win32 clean
.PHONY: install
DESTDIR='C:/Program Files/Geany'
View
@@ -77,18 +77,18 @@ $(RES): ../geany_private.rc ../icons/geany.ico
# this calls parent clean-local target because del ../file won't work
clean:
-$(RM) deps.mak *.o
- cd .. && $(MAKE) -f makefile.win32 clean-local && cd src
+ $(MAKE) -C .. -f makefile.win32 clean-local
exec:
$(EXECDIR)\geany.exe
binclean:
$(RM) $(TARGET)
-$(TARGET): $(OBJS) $(RES) ../scintilla/scintilla.a ../tagmanager/mio/mio.a ../tagmanager/tagmanager.a
- $(CXX) $(OBJS) $(RES) -o $(TARGET) \
- ../scintilla/scintilla.a ../tagmanager/tagmanager.a ../tagmanager/mio/mio.a \
- $(ALL_GTK_LIBS) $(WIN_LIBS)
+STLIBS = ../scintilla/scintilla.a ../tagmanager/tagmanager.a ../tagmanager/mio/mio.a
+
+$(TARGET): $(OBJS) $(RES) $(STLIBS)
+ $(CXX) $(OBJS) $(RES) -o $(TARGET) $(STLIBS) $(ALL_GTK_LIBS) $(WIN_LIBS)
deps.mak:
$(CC) -MM $(CFLAGS) *.c >deps.mak

0 comments on commit 08d751d

Please sign in to comment.