Changeset 14

Show
Ignore:
Timestamp:
03/25/07 16:17:26 (2 years ago)
Author:
takkaria
Message:

Makefile.std: add main.o to objects, rearrange so my config file still works.
Also, remove all the outdated definitions, apart from Solaris, which I might
be able to test fairly soon.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/Makefile.std

    r13 r14  
    2525 
    2626 
    27  
    28 # support X11 (main-x11.c) 
     27# Recent, known-to-work ports 
     28 
     29# Support X11 (main-x11.c) 
    2930# You may have to add various X11 include/library directories to the 
    3031# "CFLAGS", if your machine places files in a weird location, for example 
     
    3233SYS_x11 = -DUSE_X11 -lX11 
    3334 
    34  
    35 # support curses console mode (main-gcu.c) 
     35# Support curses console mode (main-gcu.c) 
    3636# If this fails, try the alternate below 
    3737SYS_gcu = -DUSE_GCU -DUSE_NCURSES -lncurses 
    3838#SYS_gcu = -DUSE_GCU -lcurses -ltermcap 
    3939 
    40 # support Xaw motif (main-xaw.c) 
     40# Support Xaw motif (main-xaw.c) 
    4141#SYS_xaw = -DUSE_XAW -lXaw -lXext -lSM -lICE -lXmu -lXt -lX11 
    4242 
    43 # Support gtk alternative x11 (main-gtk.c) 
     43# Support the GTK graphical tookit (main-gtk.c) 
    4444#SYS_gtk = $(shell gtk-config --cflags) -DUSE_GTK $(shell gtk-config --libs) 
    4545 
    46  
    47  
    48 # Linux specific flags (appended conditionally below) 
    49  
    50 # support raw console  (main-lfb.c) 
     46# Support "projected mode". Experimental, requires X11/Xaw/GTK to be enabled (main-xpj.c) 
     47#SYS_xpj = -DUSE_xpj 
     48 
     49# Support raw console access (main-lfb.c) -- Linux only 
    5150SYS_lfb = -DUSE_LFB 
    52 
    53 # support linux in VGA mode (main-lsl.c) 
     51 
     52# Support linux in VGA mode (main-lsl.c) -- Linux only 
    5453#SYS_lsl = -DUSE_LSL -lz -lvgagl -lvga 
    55  
    56  
    57 # Experimental. requires X11/Xaw/GTK to be enabled (main-xpj.c) 
    58 #SYS_xpj = -DUSE_xpj 
    5954 
    6055 
     
    6358# With curses support, all are effectively superceded by USE_GCU 
    6459 
    65 # use direct termio on 8bit color-depth screen (main-vcs.c) 
     60# Support direct termio on 8bit color-depth screen (main-vcs.c) 
    6661#SYS_vcs = -DUSE_VCS 
    6762 
    68 # Unix 'slang' (Also available on OS/2) (main-sla.c) 
     63# Support Unix 'slang', also available on OS/2 (main-sla.c) 
    6964#SYS_sla = -DUSE_SLA -I/usr/include/slang -lslang 
    7065 
    71 # primitive termcap emulation of a vt100 (slow and unreliable) (main-cap.c) 
     66# Support primitive termcap emulation of a vt100 (slow and unreliable) (main-cap.c) 
    7267# -DUSE_HARDCODE in the unlikely event you are using a VT100 without curses 
    7368#SYS_cap = -DUSE_CAP -ltermcap 
    7469 
    7570 
    76 # linux-specific modules are appended below 
    77  
    78 MODULES = $(SYS_x11) $(SYS_gcu) $(SYS_xaw) $(SYS_gtk) $(SYS_xpj) $(SYS_sla) $(SYS_cap) 
    79  
    80 MCFLAGS = $(patsubst -l%,,$(MODULES)) 
    81 MLFLAGS = $(patsubst -D%,,$(patsubst -I%,, $(MODULES))) 
    82  
    83  
    84  
    8571# Basic compiler stuff 
     72CC = gcc 
     73CFLAGS = -Wall -O2 -fno-strength-reduce 
     74 
    8675 
    8776# Add additional search directives here 
    8877# Example: -I/usr/X11R6/include -I/usr/include/ncurses 
    8978INCLUDES = 
    90 # Example: -L/usr/X11R6/lib 
    91 LFLAGS = 
    92  
    93 CC = gcc 
    94 CFLAGS = -Wall $(OPT) -fno-strength-reduce $(MCFLAGS) $(INCLUDES) 
    95 LIBS = $(LFLAGS) $(MLFLAGS) 
    96  
    97 X11OBJS = maid-x11.o main-x11.o main-xaw.o main-gtk.o main-xpj.o 
    98 MAINOBJS = main.o main-cap.o main-gcu.o main-gtk.o main-sla.o $(X11OBJS) $(LINUXOBJ) 
    99 OBJS = $(BASEOBJS) $(MAINOBJS) 
    100  
    101  
    102 ifeq ($(OPT),) 
    103 OPT = -O2 
    104 endif 
     79# Example: -L/usr/X11R6/lib  
     80LIBS = 
     81 
    10582 
    10683# Version info 
    107 VERSION = 3_0_7s3 
    108 # Name of the game 
    10984EXE = angband 
     85VERSION = 3.0.8 
     86 
    11087 
    11188 
     
    11895 
    11996 
    120 uname = $(shell uname) 
     97# Extract CFLAGS and LIBS from the system definitions 
     98MODULES = $(SYS_x11) $(SYS_gcu) $(SYS_xaw) $(SYS_gtk) $(SYS_xpj) $(SYS_sla) $(SYS_cap) 
     99CFLAGS += $(patsubst -l%,,$(MODULES)) $(INCLUDES) 
     100LIBS += $(patsubst -D%,,$(patsubst -I%,, $(MODULES))) 
     101 
     102 
     103# Extract system we're running on 
     104uname = $(shell uname -s) 
    121105 
    122106# Enable linux-specific modules, if requested. 
     
    127111endif 
    128112 
    129  
    130  
    131 #### Old definitions, unchanged since at least 2000 #### 
    132  
    133 ## 
    134 ## Variation -- this might work better than the suggestion above 
    135 ## 
    136 #CFLAGS = -I/usr/include/ncurses \ 
    137 #         -Wall -O2 -fno-strength-reduce -fomit-frame-pointer \ 
    138 #         -D"USE_X11" -D"USE_GCU" \ 
    139 #         -D"USE_TPOSIX" -D"USE_CURS_SET" 
    140 #LIBS = -lX11 -lncurses 
    141 #LDFLAGS = -s 
    142  
    143  
    144 ## 
    145 ## Variation -- compile for Solaris 
    146 ## 
    147 #CFLAGS = -D"USE_X11" -D"USE_GCU" -D"SOLARIS" 
    148 #LIBS = -lX11 -lsocket -lcurses 
    149  
    150  
    151 ## 
    152 ## Variation -- compile for SGI Indigo runnig Irix 
    153 ## 
    154 #CFLAGS = -D"USE_X11" -D"USE_GCU" -D"SGI" 
    155 #LIBS = -lX11 -lcurses -ltermcap -lsun 
    156  
    157  
    158 ## 
    159 ## Variation -- compile for Dec ALPHA OSF/1 v2.0 
    160 ## 
    161 #CC     = cc 
    162 ##CFLAGS = -std -O -g3 -Olimit 4000 -D"USE_X11" -D"USE_GCU" 
    163 #CFLAGS = -std -g -D"USE_X11" -D"USE_GCU" 
    164 #LIBS   = -lX11 -lcurses -ltermcap -lrpcsvc 
    165  
    166  
    167 ## 
    168 ## Variation -- compile for Interactive Unix (ISC) systems 
    169 ## 
    170 #CFLAGS = -D"USE_X11" -D"USE_GCU" -D"ISC" 
    171 #LIBS = -lX11 -lcurses -lnsl_s -linet -lcposix 
     113# Add Solaris bits -- untested 
     114ifeq ($(uname),SunOS) 
     115  LIBS += -lsocket 
     116  CFLAGS += -DSOLARIS 
     117endif 
     118 
     119 
     120# Object definitions 
     121X11OBJS = maid-x11.o main-x11.o main-xaw.o main-gtk.o main-xpj.o 
     122MAINOBJS = main.o main-cap.o main-gcu.o main-gtk.o main-sla.o $(X11OBJS) $(LINUXOBJ) 
     123OBJS = $(BASEOBJS) $(MAINOBJS) 
     124 
     125 
    172126 
    173127 
     
    204158# make a distribution 
    205159DIRS = lib/apex lib/bone lib/data lib/edit lib/file lib/help lib/info \ 
    206                lib/pref lib/save lib/user lib/xtra/sound lib/xtra/graf lib/xtra/font 
    207  
    208 TMPDIR = ./$(EXE)$(VERSION) 
     160       lib/pref lib/save lib/user lib/xtra/sound lib/xtra/graf lib/xtra/font 
     161 
     162TMPDIR = ./$(EXE)-$(VERSION) 
    209163dist: 
    210164        @-rm -rf $(TMPDIR) 
     
    221175        @-cp ../lib/xtra/graf/*.bmp $(TMPDIR)/lib/xtra/graf 
    222176        @cp $(EXE) $(TMPDIR) 
    223         tar czf ../$(EXE)$(VERSION).tgz $(TMPDIR) 
     177        tar czf ../$(EXE)-$(VERSION).tar.gz $(TMPDIR) 
    224178        rm -rf $(TMPDIR) 
    225179