Revision: 9798 https://osdn.net/projects/ttssh2/scm/svn/commits/9798 Author: zmatsuo Date: 2022-03-09 00:07:41 +0900 (Wed, 09 Mar 2022) Log Message: ----------- cygterm 単体ビルド用アーカイブ cygterm+.tar.gz を作成 Modified Paths: -------------- trunk/cygwin/cyglaunch/Makefile trunk/cygwin/cygterm/Makefile -------------- next part -------------- Modified: trunk/cygwin/cyglaunch/Makefile =================================================================== --- trunk/cygwin/cyglaunch/Makefile 2022-03-08 15:07:28 UTC (rev 9797) +++ trunk/cygwin/cyglaunch/Makefile 2022-03-08 15:07:41 UTC (rev 9798) @@ -1,8 +1,5 @@ # Makefile for cyglaunch -BINDIR = $(HOME)/bin - -UNAME_A = $(shell uname -a) UNAME_M = $(shell uname -m) CURRENT_MAKEFILE_DIR = $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) @@ -37,13 +34,12 @@ endif CFLAGS = -O2 -fno-exceptions -DUNICODE -D_UNICODE -MMD -I $(CYGLIB_DIR) -I $(COMMON_DIR) -#CFLAGS = -D_GNU_SOURCE -O2 -fno-exceptions -DUNICODE -D_UNICODE -MMD -I../cyglib -I../../teraterm/common -#CFLAGS = -D_GNU_SOURCE -O2 -fno-exceptions CXXFLAGS = $(CFLAGS) LDFLAGS = -mwindows -municode #LDFLAGS = -municode ifneq ("$(wildcard asprintf.cpp)","") +# standalone build COMMON_DIR = . CYGLIB_DIR = . CYGTERM_DIR = . @@ -66,11 +62,9 @@ OBJ = $(addsuffix .o,$(notdir $(basename $(SRC)))) DEP = $(OBJ:.o=.d) ICO = $(CYGTERM_DIR)/cygterm.ico -ARCHIVE = cygterm+.tar.gz +.PHONY: all clean install uninstall arc copyfile -.PHONY: all clean install uninstall arc $(ARCHIVE) - all : $(EXE) $(EXE) : $(OBJ) $(RES) @@ -104,24 +98,21 @@ ttlib_static_dir.o: $(COMMON_DIR)/ttlib_static_dir.cpp $(CC) $(CFLAGS) -c $< -o $@ -DENABLE_COMAPT_WIN=0 - -include $(DEP) -test: - @echo $(SRC) - @echo $(OBJ) - @echo $(COMMON_DIR) - @echo $(CYGLIB_DIR) - @echo $(MAKEFILE_LIST) - @echo $(MAKEFILE) - @echo $(CURRENT_MAKEFILE_DIR) - -arc: $(ARCHIVE) - -$(ARCHIVE): -ifneq ("$(wildcard $(ARCHIVE))","") - gunzip $(ARCHIVE) -endif - tar rvf $(ARCHIVE:.gz=) cyglaunch.c Makefile -C $(COMMON_DIR) asprintf.cpp asprintf.h win32helper.cpp win32helper.h -C $(CURRENT_MAKEFILE_DIR)/$(CYGLIB_DIR) cyglib.c cyglib.h -C $(CURRENT_MAKEFILE_DIR)/$(CYGTERM_DIR) cygterm.ico - gzip $(ARCHIVE:.gz=) - +# copy files for standalone build +copyfile: + @echo COPY_DEST=$(COPY_DEST) + cp Makefile $(COPY_DEST)/Makefile.cyglaunch + cp cyglaunch.c $(COPY_DEST) + cp $(COMMON_DIR)/asprintf.cpp $(COPY_DEST) + cp $(COMMON_DIR)/asprintf.h $(COPY_DEST) + cp $(COMMON_DIR)/win32helper.cpp $(COPY_DEST) + cp $(COMMON_DIR)/win32helper.h $(COPY_DEST) + cp $(COMMON_DIR)/ttlib_static_dir.cpp $(COPY_DEST) + cp $(COMMON_DIR)/ttlib_static_dir.h $(COPY_DEST) + cp $(COMMON_DIR)/ttknownfolders.c $(COPY_DEST) + cp $(COMMON_DIR)/ttknownfolders.h $(COPY_DEST) + cp $(CYGLIB_DIR)/cyglib.c $(COPY_DEST) + cp $(CYGLIB_DIR)/cyglib.h $(COPY_DEST) + cp $(CYGTERM_DIR)/cygterm.ico $(COPY_DEST) Modified: trunk/cygwin/cygterm/Makefile =================================================================== --- trunk/cygwin/cygterm/Makefile 2022-03-08 15:07:28 UTC (rev 9797) +++ trunk/cygwin/cygterm/Makefile 2022-03-08 15:07:41 UTC (rev 9798) @@ -60,6 +60,9 @@ .PHONY: cygterm+-x86_64-clean cygterm+-i686-clean all : $(EXE) +ifneq (,$(wildcard Makefile.cyglaunch)) + make -f Makefile.cyglaunch +endif -include $(DEP) @@ -95,8 +98,15 @@ rm -f $(BINDIR)/$(EXE) rm -f $(BINDIR)/$(CFG) -$(ARCHIVE) : $(SRC) $(H) $(ICO) $(CFG) README README-j Makefile CMakeLists.txt - tar cf - $(SRC) $(H) $(ICO) $(CFG) COPYING README README-j Makefile CMakeLists.txt msys2term.cfg | gzip > $(ARCHIVE) +$(ARCHIVE) : $(SRC) $(H) $(ICO) $(CFG) COPYING README README-j Makefile CMakeLists.txt + rm -f $(ARCHIVE) + rm -rf tar_tmp/ + mkdir tar_tmp + cp $^ tar_tmp/ + cd ../cyglaunch/; make copyfile COPY_DEST=../cygterm/tar_tmp + (cd tar_tmp; tar cf ../$(ARCHIVE:.gz=) *) + gzip $(ARCHIVE:.gz=) + rm -rf tar_tmp/ cygterm.o: ifeq (0, $(shell nm /usr/lib/crt0.o | grep -c WinMainCRTStartup))