Permalink
Browse files

Add "makefile-gcc"(thanks to nocd5).

Rename "ChangeLog" to "ChangeLog.txt".
  • Loading branch information...
deflis committed May 8, 2010
1 parent c520bfe commit ceb7d9c2be7b8f383f92f01512fc934851d1e45d
Showing with 58 additions and 0 deletions.
  1. 0 ChangeLog → ChangeLog.txt
  2. +58 −0 makefile-gcc
File renamed without changes.
View
@@ -0,0 +1,58 @@
+BIN = ckw.exe
+RES = rsrc.res
+RM = rm
+OBJ = main.o \
+ option.o \
+ selection.o \
+ ime_wrap.o \
+ misc.o
+
+DEFINES = -DNDEBUG -Dwcscat_s=wcscat
+# --------------------------------------------------------------------
+
+ifdef INSTDIR
+all: $(INSTDIR)\$(BIN)
+else
+all: $(BIN)
+endif
+
+$(INSTDIR)\$(BIN): $(BIN)
+ command.com /c copy $(BIN) $(INSTDIR)
+
+clean:
+ $(RM) -f $(OBJ) $(RES) $(BIN)
+
+CC = gcc.exe
+CP = g++.exe
+WINDRES = windres.exe -J rc -O coff --include-dir $(<D)
+CFLAGS = -Os -Wall \
+ -fno-rtti \
+ -fno-exceptions \
+ -fomit-frame-pointer \
+ -fmove-all-movables \
+ -c $(DEFINES)
+LFLAGS =
+LOPTS = -Wl,--entry,_wWinMain,--enable-stdcall-fixup
+LIBS = -s -mwindows -nostartfiles
+
+
+# --------------------------------------------------------------------
+
+$(BIN): $(OBJ) $(RES) makefile-gcc
+ $(CP) $(LFLAGS) $(OBJ) $(RES) $(LIBS) $(LOPTS) -o $(BIN)
+
+depend.txt: $(patsubst %.o,%.cpp,$(OBJ))
+ $(CC) -MM $^ >$@
+
+# --------------------------------------------------------------------
+
+%.o: %.c
+ $(CC) $(CFLAGS) $< -o $@
+
+%.o: %.cpp
+ $(CP) $(CFLAGS) $< -o $@
+
+%.res: %.rc
+ $(WINDRES) -i $< -o $@
+
+# --------------------------------------------------------------------

0 comments on commit ceb7d9c

Please sign in to comment.