makefile.linux-gnu-static 775 Bytes
Newer Older
Giuseppe Stanghellini's avatar
Giuseppe Stanghellini committed
1
LIBS = -lm -ldl -lSDL2 -lSDL2_gfx -lpthread
Giuseppe Stanghellini's avatar
Giuseppe Stanghellini committed
2 3 4 5 6 7 8
LIBSPATH =
LDLIBS = $(LIBS)
DEPLIBS =
CC = gcc
C++ = g++
CPP = cc -E
LD = ld
Giuseppe Stanghellini's avatar
Giuseppe Stanghellini committed
9
CFLAGS = -O3 -std=c99
Giuseppe Stanghellini's avatar
Giuseppe Stanghellini committed
10 11 12 13 14 15
CCLINK = $(CC)
CXXLINK = $(CXX)
OBJS = segy-change.o

default:
	@$(MAKE) -f makefile.linux-gnu-static segy-change \
Giuseppe Stanghellini's avatar
Giuseppe Stanghellini committed
16
	"CFLAGS = -O3 -std=c99 -DWITH_SDL" 
Giuseppe Stanghellini's avatar
Giuseppe Stanghellini committed
17 18 19

nosdl:
	@$(MAKE) -f makefile.linux-gnu-static segy-change \
Giuseppe Stanghellini's avatar
Giuseppe Stanghellini committed
20 21
	"CFLAGS = -O3 -std=c99 " \
	"LIBS =  -lm -lc" 
Giuseppe Stanghellini's avatar
Giuseppe Stanghellini committed
22 23 24

debug:
	@$(MAKE) -f makefile.linux-gnu-static segy-change \
Giuseppe Stanghellini's avatar
Giuseppe Stanghellini committed
25
	"CFLAGS = -g -std=c99 -DWITH_SDL" 
Giuseppe Stanghellini's avatar
Giuseppe Stanghellini committed
26 27 28

segy-change: $(OBJS) $(DEPLIBS)
	$(RM) $@
Giuseppe Stanghellini's avatar
Giuseppe Stanghellini committed
29
	$(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBRARIES) $(LDLIBS) $(LIBS) $(EXTRA_LOAD_FLAGS) -static
Giuseppe Stanghellini's avatar
Giuseppe Stanghellini committed
30 31 32 33 34 35
	
clean:
	$(RM) *.CKP *.ln *.BAK *.bak *.o core errs *~ *.a segy-change

.depend:
	for i in *.c;do $(CPP) -M $$i;done >.depend