71 lines
1.5 KiB
Makefile
71 lines
1.5 KiB
Makefile
|
|
||
|
prefix = @prefix@
|
||
|
exec_prefix = @exec_prefix@
|
||
|
bindir = @bindir@
|
||
|
|
||
|
CC = @CC@
|
||
|
LD = $(CC)
|
||
|
AS = $(CC)
|
||
|
INSTALL = @INSTALL@
|
||
|
|
||
|
CFLAGS = @CFLAGS@
|
||
|
LDFLAGS = $(CFLAGS) @LDFLAGS@
|
||
|
ASFLAGS = $(CFLAGS)
|
||
|
|
||
|
TARGETS = @TARGETS@
|
||
|
|
||
|
ASM_OBJS = @ASM_OBJS@
|
||
|
|
||
|
SYS_DEFS = @DEFS@ @ENDIAN@ @ASM@ @SYS_DEFS@
|
||
|
SYS_OBJS = sys/nix/nix.o $(ASM_OBJS)
|
||
|
SYS_INCS = -I/usr/local/include @XINCS@ -I./sys/nix
|
||
|
|
||
|
FB_OBJS = @FB_OBJS@ @JOY@ @SOUND@
|
||
|
FB_LIBS =
|
||
|
|
||
|
SVGA_OBJS = sys/svga/svgalib.o sys/pc/keymap.o @JOY@ @SOUND@
|
||
|
SVGA_LIBS = -L/usr/local/lib -lvga
|
||
|
|
||
|
SDL_OBJS = sys/sdl/sdl.o sys/sdl/keymap.o
|
||
|
SDL_LIBS = @SDL_LIBS@
|
||
|
SDL_CFLAGS = @SDL_CFLAGS@
|
||
|
|
||
|
X11_OBJS = sys/x11/xlib.o sys/x11/keymap.o @JOY@ @SOUND@
|
||
|
X11_LIBS = @XLIBS@ -lX11 -lXext
|
||
|
|
||
|
all: $(TARGETS)
|
||
|
|
||
|
include Rules
|
||
|
|
||
|
fbgnuboy: $(OBJS) $(SYS_OBJS) $(FB_OBJS)
|
||
|
$(LD) $(LDFLAGS) $(OBJS) $(SYS_OBJS) $(FB_OBJS) -o $@ $(FB_LIBS)
|
||
|
|
||
|
sgnuboy: $(OBJS) $(SYS_OBJS) $(SVGA_OBJS)
|
||
|
$(LD) $(LDFLAGS) $(OBJS) $(SYS_OBJS) $(SVGA_OBJS) -o $@ $(SVGA_LIBS)
|
||
|
|
||
|
sdlgnuboy: $(OBJS) $(SYS_OBJS) $(SDL_OBJS)
|
||
|
$(LD) $(LDFLAGS) $(OBJS) $(SYS_OBJS) $(SDL_OBJS) -o $@ $(SDL_LIBS)
|
||
|
|
||
|
sys/sdl/sdl.o: sys/sdl/sdl.c
|
||
|
$(MYCC) $(SDL_CFLAGS) -c $< -o $@
|
||
|
|
||
|
sys/sdl/keymap.o: sys/sdl/keymap.c
|
||
|
$(MYCC) $(SDL_CFLAGS) -c $< -o $@
|
||
|
|
||
|
xgnuboy: $(OBJS) $(SYS_OBJS) $(X11_OBJS)
|
||
|
$(LD) $(LDFLAGS) $(OBJS) $(SYS_OBJS) $(X11_OBJS) -o $@ $(X11_LIBS)
|
||
|
|
||
|
install: all
|
||
|
$(INSTALL) -d $(bindir)
|
||
|
$(INSTALL) -m 755 $(TARGETS) $(bindir)
|
||
|
|
||
|
clean:
|
||
|
rm -f *gnuboy gmon.out *.o sys/*.o sys/*/*.o asm/*/*.o
|
||
|
|
||
|
distclean: clean
|
||
|
rm -f config.* sys/nix/config.h Makefile
|
||
|
|
||
|
|
||
|
|
||
|
|