blob: 04578ea57080c91edf57ac2ff06326123541f577 (
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
|
ARCH := $(patsubst i%86,i386,$(shell uname -m))
ARCH := $(patsubst sparc%,sparc,$(ARCH))
ARCH := $(patsubst amd64,x86_64,$(ARCH))
ifeq (i386,$(ARCH))
HAS_VBE = y
endif
ifeq (x86_64,$(ARCH))
HAS_VBE = y
endif
CC = gcc
CFLAGS = -O -Wall # -g -DDEBUG
INCS = -I.
LDFLAGS = -lm
ifeq (y,$(HAS_VBE))
LDFLAGS += -L. -lint10 -lx86emu
OBJS = ddcxinfos.o vesamode.o vbe.o
LIBS = libint10.a libx86emu.a
endif
ifeq (,$(OBJS))
OBJS = not_handled.o
endif
TARGETS = ddcxinfos
all: $(TARGETS)
ddcxinfos: $(OBJS) $(LIBS)
$(CC) -o $@ $(OBJS) $(CFLAGS) $(LDFLAGS)
libx86emu.a:
$(MAKE) -C x86emu
libint10.a: libx86emu.a
$(MAKE) -C int10
%.o: %.c
$(CC) $(CFLAGS) $(INCS) -c $< -o $@
clean:
$(MAKE) -C int10 clean
$(MAKE) -C x86emu clean
$(RM) $(TARGETS) $(LIBS) *.o core
|