New Unix configure system
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
8
install/unix/setup/rules/generic/bin1
Normal file
8
install/unix/setup/rules/generic/bin1
Normal file
@@ -0,0 +1,8 @@
|
||||
binary:: binary1
|
||||
|
||||
depend_binary:: depend_binary1
|
||||
|
||||
clean_binary:: clean_binary1
|
||||
|
||||
include $(RULES_GENERIC)/bin1gen
|
||||
|
16
install/unix/setup/rules/generic/bin1gen
Normal file
16
install/unix/setup/rules/generic/bin1gen
Normal file
@@ -0,0 +1,16 @@
|
||||
# create binary
|
||||
|
||||
binary1:: $(BIN_BASE_DIR)/$(BIN_TARGET)
|
||||
|
||||
$(BIN_BASE_DIR)/$(BIN_TARGET): $(BIN_OBJ)
|
||||
@$(RM) -f $@
|
||||
$(LINK) $(BIN_OBJ) -L. $(BIN_LINK) $(LINK_LIBS)
|
||||
|
||||
# defining dependencies
|
||||
|
||||
depend_binary1::
|
||||
|
||||
# cleaning all files
|
||||
|
||||
clean_binary1::
|
||||
@$(RM) -f $(BIN_BASE_DIR)/$(BIN_TARGET)
|
9
install/unix/setup/rules/generic/bin2
Normal file
9
install/unix/setup/rules/generic/bin2
Normal file
@@ -0,0 +1,9 @@
|
||||
binary:: binary1 binary2
|
||||
|
||||
depend_binary:: depend_binary1 depend_binary2
|
||||
|
||||
clean_binary:: clean_binary1 clean_binary2
|
||||
|
||||
include $(RULES_GENERIC)/bin1gen
|
||||
include $(RULES_GENERIC)/bin2gen
|
||||
|
16
install/unix/setup/rules/generic/bin2gen
Normal file
16
install/unix/setup/rules/generic/bin2gen
Normal file
@@ -0,0 +1,16 @@
|
||||
# create binary
|
||||
|
||||
binary2:: $(BIN_BASE_DIR)/$(BIN2_TARGET)
|
||||
|
||||
$(BIN_BASE_DIR)/$(BIN2_TARGET): $(BIN2_OBJ)
|
||||
@$(RM) -f $@
|
||||
$(LINK) $(BIN2_OBJ) -L. $(BIN2_LINK) $(LINK_LIBS)
|
||||
|
||||
# defining dependencies
|
||||
|
||||
depend_binary2::
|
||||
|
||||
# cleaning all files
|
||||
|
||||
clean_binary2::
|
||||
@$(RM) -f $(BIN_BASE_DIR)/$(BIN2_TARGET)
|
18
install/unix/setup/rules/generic/depend
Normal file
18
install/unix/setup/rules/generic/depend
Normal file
@@ -0,0 +1,18 @@
|
||||
depend::
|
||||
@echo "$(CXX) -MM \
|
||||
$(WX_INCLUDES) \
|
||||
$(ADD_COMPILE) \
|
||||
$(LIB_SRC) $(BIN_SRC) $(BIN2_SRC)"
|
||||
@(cd .. ;\
|
||||
$(CXX) -MM \
|
||||
$(WX_INCLUDES) \
|
||||
$(ADD_COMPILE) \
|
||||
$(LIB_SRC) $(BIN_SRC) $(BIN2_SRC)\
|
||||
) > .depend
|
||||
@cp Makefile Makefile.bak
|
||||
@cat Makefile.bak | awk 'BEGIN { found=0;} { if ( $$0 == "# DO NOT DELETE") {found=1} ; { if ( found==0 ) { print $$0; } } }' > Makefile1
|
||||
@echo "# DO NOT DELETE" >> Makefile1
|
||||
@cat .depend >> Makefile1
|
||||
@mv Makefile1 Makefile
|
||||
@rm .depend
|
||||
|
15
install/unix/setup/rules/generic/globals
Normal file
15
install/unix/setup/rules/generic/globals
Normal file
@@ -0,0 +1,15 @@
|
||||
# creates subdirectories for object-files in case they are needed...
|
||||
|
||||
subdirs::
|
||||
@if test "x$(SRC_DIR)" != x ; then \
|
||||
echo -n "Creating necessary subdirs: "; \
|
||||
for each in $(SRC_DIR) xxx; do \
|
||||
if test "x$$each" != xxxx; then \
|
||||
echo -n "$$each "; \
|
||||
if test ! -d $$each ; then \
|
||||
mkdir $$each ; \
|
||||
fi; \
|
||||
fi; \
|
||||
done; \
|
||||
echo "";\
|
||||
fi
|
17
install/unix/setup/rules/generic/lib
Normal file
17
install/unix/setup/rules/generic/lib
Normal file
@@ -0,0 +1,17 @@
|
||||
# create library
|
||||
|
||||
library:: $(LIB_BASE_DIR)/lib$(LIB_TARGET).a
|
||||
|
||||
$(LIB_BASE_DIR)/lib$(LIB_TARGET).a: $(LIB_OBJ)
|
||||
@$(RM) -f $@
|
||||
$(AR) rv $@ $(LIB_OBJ)
|
||||
|
||||
# defining dependencies
|
||||
|
||||
depend_library::
|
||||
|
||||
# cleaning all files
|
||||
|
||||
clean_library::
|
||||
@$(RM) -f $(LIB_BASE_DIR)/lib$(LIB_TARGET).a
|
||||
|
24
install/unix/setup/rules/generic/needed
Normal file
24
install/unix/setup/rules/generic/needed
Normal file
@@ -0,0 +1,24 @@
|
||||
#SHELL=/bin/sh
|
||||
MYGREP=$(WXBASEDIR)/setup/general/mygrep
|
||||
checkneeds::
|
||||
@if test "x$(NEEDED_DEFINES)" != x ; then \
|
||||
RESULT=0 ; \
|
||||
for each in $(NEEDED_DEFINES) xxx; do \
|
||||
if test "$$each" != xxx ; then \
|
||||
LINE=`cat $(SETUP_DIR)/wx_setup.h \
|
||||
| sed "s/ /,/g" \
|
||||
| $(MYGREP) ",$$each," \
|
||||
| $(MYGREP) "#define" \
|
||||
| $(MYGREP) "1" ` ; \
|
||||
if test "x$$LINE" = x ; then \
|
||||
(TMPVAR=`pwd`;\
|
||||
TMPVAR=`dirname $$TMPVAR`;\
|
||||
echo "$$each needed to compile "`basename $$TMPVAR`"...";\
|
||||
);\
|
||||
RESULT=1 ; \
|
||||
fi; \
|
||||
fi; \
|
||||
done ;\
|
||||
exit $$RESULT; \
|
||||
fi
|
||||
|
30
install/unix/setup/rules/generic/obj
Normal file
30
install/unix/setup/rules/generic/obj
Normal file
@@ -0,0 +1,30 @@
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .o .c
|
||||
.SUFFIXES: .o .cc
|
||||
.SUFFIXES: .o .cpp
|
||||
|
||||
VPATH= ..
|
||||
|
||||
.c.o :
|
||||
@$(RM) -f $@
|
||||
$(CC) -c -o $@ $(CFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<
|
||||
|
||||
.cc.o :
|
||||
@$(RM) -f $@
|
||||
$(CXX) -c -o $@ $(CXXFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<
|
||||
|
||||
.cpp.o :
|
||||
@$(RM) -f $@
|
||||
$(CXX) -c -o $@ $(CXXFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<
|
||||
|
||||
clean_obj::
|
||||
@$(RM) *.o *.osh
|
||||
@if test "x$(SRC_DIR)" != x ; then \
|
||||
for each in $(SRC_DIR) xxx; do \
|
||||
if test -d $$each ; then \
|
||||
$(RM) $$each/*.o $$each/*.osh ; \
|
||||
fi; \
|
||||
done; \
|
||||
fi;
|
||||
|
||||
include $(RULES_GENERIC)/depend
|
21
install/unix/setup/rules/generic/slib
Normal file
21
install/unix/setup/rules/generic/slib
Normal file
@@ -0,0 +1,21 @@
|
||||
# create library
|
||||
|
||||
library:: $(LIB_BASE_DIR)/lib$(LIB_TARGET).a
|
||||
|
||||
$(LIB_BASE_DIR)/lib$(LIB_TARGET).a: $(LIB_OBJ)
|
||||
@$(RM) -f $@ $(LIB_BASE_DIR)/lib$(LIB_TARGET).so $(LIB_BASE_DIR)/lib$(LIB_TARGET).so.*
|
||||
@if test "x$(CREATE_SHARED)" != x; then\
|
||||
echo "$(SHARE_DIR)/$(CREATE_SHARED) $(CC) $(LIB_BASE_DIR)/lib$(LIB_TARGET).so $(LIB_MAJOR) $(LIB_MINOR) $(LIB_OBJ)"; \
|
||||
$(SHARE_DIR)/$(CREATE_SHARED) $(CC) $(LIB_BASE_DIR)/lib$(LIB_TARGET).so $(LIB_MAJOR) $(LIB_MINOR) $(LIB_OBJ); \
|
||||
fi
|
||||
$(AR) rv $@ $(LIB_OBJ)
|
||||
|
||||
# defining dependencies
|
||||
|
||||
depend_library::
|
||||
|
||||
# cleaning all files
|
||||
|
||||
clean_library::
|
||||
@$(RM) -f $(LIB_BASE_DIR)/lib$(LIB_TARGET).a $(LIB_BASE_DIR)/lib$(LIB_TARGET).so.* $(LIB_BASE_DIR)/lib$(LIB_TARGET).so
|
||||
|
42
install/unix/setup/rules/generic/sobj
Normal file
42
install/unix/setup/rules/generic/sobj
Normal file
@@ -0,0 +1,42 @@
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .o .c
|
||||
.SUFFIXES: .o .cc
|
||||
.SUFFIXES: .o .cpp
|
||||
|
||||
VPATH= ..
|
||||
|
||||
.c.o :
|
||||
@$(RM) -f $@ $@sh
|
||||
@if test "x$(PICFLAGS)" != x; then \
|
||||
echo "$(CC) -c -o $@sh $(PICFLAGS) $(CFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<";\
|
||||
$(CC) -c -o $@sh $(PICFLAGS) $(CFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<;\
|
||||
fi
|
||||
$(CC) -c -o $@ $(CFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<
|
||||
|
||||
.cc.o :
|
||||
@$(RM) -f $@ $@sh
|
||||
@if test "x$(PICFLAGS)" != x; then \
|
||||
echo "$(CXX) -c -o $@sh $(PICFLAGS) $(CXXFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<";\
|
||||
$(CXX) -c -o $@sh $(PICFLAGS) $(CXXFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<;\
|
||||
fi
|
||||
$(CXX) -c -o $@ $(CXXFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<
|
||||
|
||||
.cpp.o :
|
||||
@$(RM) -f $@ $@sh
|
||||
@if test "x$(PICFLAGS)" != x; then \
|
||||
echo "$(CXX) -c -o $@sh $(PICFLAGS) $(CXXFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<";\
|
||||
$(CXX) -c -o $@sh $(PICFLAGS) $(CXXFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<;\
|
||||
fi
|
||||
$(CXX) -c -o $@ $(CXXFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<
|
||||
|
||||
clean_obj::
|
||||
@$(RM) *.o *.osh
|
||||
@if test "x$(SRC_DIR)" != x ; then \
|
||||
for each in $(SRC_DIR) xxx; do \
|
||||
if test -d $$each ; then \
|
||||
$(RM) $$each/*.o $$each/*.osh ; \
|
||||
fi; \
|
||||
done; \
|
||||
fi;
|
||||
|
||||
include $(RULES_GENERIC)/depend
|
Reference in New Issue
Block a user