aboutsummaryrefslogtreecommitdiffstats
path: root/code/tools/asm/Makefile
blob: f03025cad3ba2b52c99e34598ad877de3822e0c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# yeah, couldn't do more simple really

ifeq ($(PLATFORM),mingw32)
  BINEXT=.exe
else
  BINEXT=
endif

ifeq ($(PLATFORM),SunOS)
  INSTALL=ginstall
else
  INSTALL=install
endif

CC=gcc
Q3ASM_CFLAGS=-O2 -Wall -Werror -fno-strict-aliasing

ifeq ($(PLATFORM),darwin)
  LCC_CFLAGS += -DMACOS_X=1
endif

ifndef USE_CCACHE
  USE_CCACHE=0
endif

ifeq ($(USE_CCACHE),1)
  CC := ccache $(CC)
  CXX := ccache $(CXX)
endif

default:	q3asm

q3asm:	q3asm.c cmdlib.c
	$(CC) $(Q3ASM_CFLAGS) -o $@ $^

clean:
	rm -f q3asm *~ *.o

install: default
	$(INSTALL) -s -m 0755 q3asm$(BINEXT) ../

uninstall:
	rm -f ../q3asm$(BINEXT)