143 lines
4.2 KiB
Text
143 lines
4.2 KiB
Text
$NetBSD: patch-aa,v 1.4 2006/04/21 09:00:23 joerg Exp $
|
|
|
|
--- Makefile.orig 1998-07-14 13:41:40.000000000 +0000
|
|
+++ Makefile
|
|
@@ -3,8 +3,8 @@
|
|
|
|
#BinInstallPath=$(ARCH)/
|
|
#LibInstallPath=images/
|
|
-BinInstallPath=/usr/X11R6/bin/
|
|
-LibInstallPath=/usr/lib/Wormz/
|
|
+BinInstallPath=$(PREFIX)/bin/
|
|
+LibInstallPath=$(PREFIX)/share/Wormz/
|
|
|
|
#AllDepths=16
|
|
AllDepths=8 16 24
|
|
@@ -29,13 +29,23 @@ else
|
|
ifeq ($(TYPEOS),Linux)
|
|
ARCH=Linux
|
|
EXTRALIBS=-lm
|
|
+else
|
|
+ifeq ($(TYPEOS),NetBSD)
|
|
+ARCH=NetBSD
|
|
+EXTRALIBS=-lm
|
|
+else
|
|
+ifeq ($(TYPEOS),DragonFly)
|
|
+ARCH=DragonFly
|
|
+EXTRALIBS=-lm
|
|
+else
|
|
#!!!
|
|
#EXTRALIBS=-lefence
|
|
-else
|
|
|
|
endif
|
|
endif
|
|
endif
|
|
+endif
|
|
+endif
|
|
|
|
ifdef USE_GGI
|
|
EXTRAGGILIBS=-lggi -lt1
|
|
@@ -43,11 +53,11 @@ endif
|
|
|
|
ifdef ARCH
|
|
|
|
-INSTALL=install
|
|
-INSTALLBIN=install -s
|
|
+INSTALL=install -c
|
|
+INSTALLBIN=install -c -s
|
|
INSTALLDIR=install -d
|
|
|
|
-CC=gcc
|
|
+#CC=gcc
|
|
CDEFS=-D$(ARCH) -DARCHDIR=\"$(ARCHDIR)\" -DColorDepth=$(Depth)
|
|
|
|
OPTFLAGS=-O2
|
|
@@ -60,8 +70,8 @@ WARNFLAGS=-Wall -Wcast-qual -Wcast-align
|
|
#-lefence
|
|
CFLAGS=-pipe $(INCLUDE) $(OPTFLAGS) $(DEBUGFLAGS) $(WARNFLAGS) $(CDEFS)
|
|
#-Wshadow
|
|
-X11INCLUDE=-I/usr/openwin/share/include/
|
|
-STDINCLUDE=-I/usr/local/lib/g++-include/ -I/usr/include/g++/
|
|
+X11INCLUDE=-I${X11BASE}/include
|
|
+STDINCLUDE=
|
|
INCLUDE=-I./include -I. $(X11INCLUDE) $(STDINCLUDE)
|
|
|
|
|
|
@@ -108,7 +118,7 @@ ObjsClientND=$(addprefix $(OBJDIR),$(Obj
|
|
|
|
SrcsClient=$(SrcsClientND) $(SrcsClientDD)
|
|
ObjsClient=$(ObjsClientND) $(ObjsClientDD)
|
|
-LibsClient=-L/usr/X11R6/lib/ -L/usr/local/lib/ -lX11 -lXext $(EXTRALIBS) $(EXTRAGGILIBS)
|
|
+LibsClient=${LDFLAGS} -L${X11BASE}/lib -lX11 -lXext $(EXTRALIBS) $(EXTRAGGILIBS)
|
|
|
|
SrcsServer=$(foreach dir,$(DirsServer),$(wildcard $(dir)/*.cc))
|
|
SrcsServerNotDir=$(notdir $(SrcsServer))
|
|
@@ -120,7 +130,7 @@ SrcsRunner=$(foreach dir,$(DirsRunner),$
|
|
SrcsRunnerNotDir=$(notdir $(SrcsRunner))
|
|
ObjsRunnerNotDir=$(SrcsRunnerNotDir:.cc=.o)
|
|
ObjsRunner=$(addprefix $(OBJDIR),$(ObjsRunnerNotDir))
|
|
-LibsRunner=-L/usr/X11R6/lib/ -L/usr/local/lib/ -lX11
|
|
+LibsRunner=${LDFLAGS} -L${LOCALBASE}/lib -L${PREFIX}/lib/ -lX11
|
|
|
|
AllDSrcs=$(foreach dir,$(DepthDepenceDirs),$(wildcard $(dir)/*.cc))
|
|
AllNSrcs=$(foreach dir,$(NotDepthDepenceDirs),$(wildcard $(dir)/*.cc))
|
|
@@ -130,10 +140,10 @@ vpath %.o $(OBJDIR)
|
|
|
|
|
|
$(OBJDIR)%$(Depth).o: %.cc
|
|
- $(CC) $(CFLAGS) -c $< -o $@
|
|
+ $(CXX) $(CFLAGS) -c $< -o $@
|
|
|
|
$(OBJDIR)%.o: %.cc
|
|
- $(CC) $(CFLAGS) -c $< -o $@
|
|
+ $(CXX) $(CFLAGS) -c $< -o $@
|
|
|
|
DEPEND=$(OBJDIR).depend
|
|
|
|
@@ -147,9 +157,9 @@ depend: Create-PathConfig
|
|
Depth=xxx $(MAKE) real-depend
|
|
|
|
real-depend:
|
|
- $(CC) $(CFLAGS) -MM $(AllNSrcs) | \
|
|
+ $(CXX) $(CFLAGS) -MM $(AllNSrcs) | \
|
|
awk '/^[^ ]/ { print "$(OBJDIR)" $$0 } /^ / { print $$0 }' > $(DEPEND)
|
|
- $(CC) $(CFLAGS) -MM $(AllDSrcs) | \
|
|
+ $(CXX) $(CFLAGS) -MM $(AllDSrcs) | \
|
|
awk '/^[^ ]/ { print "$(OBJDIR)" $$0 } /^ / { print $$0 }' > .deptmp
|
|
for i in $(AllDepths); do \
|
|
sed s/\\\.o/$$i\\\.o/g < .deptmp >> $(DEPEND) ; done
|
|
@@ -160,13 +170,13 @@ clean:
|
|
rm -f `find . -name \*~`
|
|
|
|
$(TargetClient): $(ObjsClient)
|
|
- $(CC) $(CFLAGS) -o $(TargetClient) $(LibsClient) $(ObjsClient)
|
|
+ $(CXX) $(CFLAGS) -o $(TargetClient) $(LibsClient) $(ObjsClient)
|
|
|
|
$(TargetRunner): $(ObjsRunner)
|
|
- $(CC) $(CFLAGS) -o $(TargetRunner) $(LibsRunner) $(ObjsRunner)
|
|
+ $(CXX) $(CFLAGS) -o $(TargetRunner) $(LibsRunner) $(ObjsRunner)
|
|
|
|
$(TargetServer): $(ObjsServer)
|
|
- $(CC) $(CFLAGS) -o $(TargetServer) $(LibsServer) $(ObjsServer)
|
|
+ $(CXX) $(CFLAGS) -o $(TargetServer) $(LibsServer) $(ObjsServer)
|
|
|
|
Client-target: $(TargetClient)
|
|
|
|
@@ -178,14 +188,14 @@ PathConfig=include/PathConfig.hh
|
|
Create-PathConfig:
|
|
echo '#ifndef _PathConfig_hh_' > $(PathConfig)
|
|
echo '#define _PathConfig_hh_' >> $(PathConfig)
|
|
- echo '#define ClientBinInstallPath "$(LibInstallPath)$(TargetNameClient)"' >> $(PathConfig)
|
|
+ echo '#define ClientBinInstallPath "$(BinInstallPath)$(TargetNameClient)"' >> $(PathConfig)
|
|
echo '#define ServerBinInstallPath "$(BinInstallPath)$(TargetNameServer)"' >> $(PathConfig)
|
|
echo '#define LibInstallPath "$(LibInstallPath)"' >> $(PathConfig)
|
|
echo '#define '$(DEF_USE_GGI) >> $(PathConfig)
|
|
echo '#endif' >> $(PathConfig)
|
|
|
|
install-client2:
|
|
- $(INSTALLBIN) $(TargetClient) $(LibInstallPath)$(TargetNameClient)
|
|
+ $(INSTALLBIN) $(TargetClient) $(BinInstallPath)$(TargetNameClient)
|
|
|
|
install: all
|
|
$(INSTALLDIR) $(BinInstallPath)
|