aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
blob: c6a56512fa3d8d2793a753b01ad87d1224975c3e (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
ifeq ($(LIBMIKMOD_BASE),)
$(error Set LIBMIKMOD_BASE variable to libmikmod base directory)
endif

LIB	:= ../libubox.a
CC	:= i586-pc-msdosdjgpp-gcc
CFLAGS	:= -I./ -I$(LIBMIKMOD_BASE)/include -I../include -Wall -Werror -pedantic -O3 -fomit-frame-pointer -ffast-math -march=i386 -DDEBUG

AR	:= ar
ARFLAGS := cr
RANLIB	:= ranlib

SRCS	:= $(wildcard *.c)
OBJS	:= $(SRCS:.c=.o)

all: $(LIB)

$(LIB): $(OBJS)
	$(AR) $(ARFLAGS) $@ $^
	$(RANLIB) $@

.c.o:
	$(CC) -c $(CFLAGS) $< -o $@

clean:
	rm -f *.o Makefile.deps

cleanall: clean
	rm -f $(LIB)

Makefile.deps: $(SRCS)
	$(CC) $(CFLAGS) -MM *.[ch] > Makefile.deps

.PHONY: all clean cleanall

include Makefile.deps