fix crash when specifying --source on command line
[rofl0r-gnuboy.git] / Makefile.nix
blob3f22450d117249f08441a81f313ceaa9d74c83be
2 # Makefile.nix
4 # This is a *bare minimum* makefile for building gnuboy on *nix systems.
5 # If you have trouble with the configure script you can try using this,
6 # but *please* try the configure script first. This file is mostly
7 # unmaintained and may break.
9 # If you *do* insist on using this makefile, you at least need to check
10 # SYS_DEFS below and uncomment -DIS_LITTLE_ENDIAN if your system is
11 # little endian. Also, you may want to enable the OSS sound module if
12 # your system supports it.
15 prefix = /usr/local
16 bindir = /bin
18 CC = gcc
19 AS = $(CC)
20 LD = $(CC)
21 INSTALL = /bin/install -c
23 CFLAGS = -O3
24 LDFLAGS = 
25 ASFLAGS = 
27 SYS_DEFS = #-DIS_LITTLE_ENDIAN
28 ASM_OBJS = 
29 #SND_OBJS = sys/oss/oss.o
30 SND_OBJS = sys/dummy/nosound.o
31 JOY_OBJS = sys/dummy/nojoy.o
33 TARGETS = xgnuboy
35 SYS_OBJS = sys/nix/nix.o $(ASM_OBJS) $(SND_OBJS) $(JOY_OBJS)
36 SYS_INCS = -I/usr/local/include -I/usr/X11R6/include -I./sys/nix
38 X11_OBJS = sys/x11/xlib.o sys/x11/keymap.o
39 X11_LIBS = -L/usr/X11R6/lib -lX11 -lXext
41 all: $(TARGETS)
43 include Rules
45 xgnuboy: $(OBJS) $(SYS_OBJS) $(X11_OBJS)
46         $(LD) $(LDFLAGS) $(OBJS) $(SYS_OBJS) $(X11_OBJS) -o $@ $(X11_LIBS)
48 install: all
49         $(INSTALL) -m 755 $(TARGETS) $(prefix)$(bindir)
51 clean:
52         rm -f *gnuboy gmon.out *.o sys/*.o sys/*/*.o asm/*/*.o