cf6029c55c6c67b65c30b79e456364862189ae44
[reactos.git] / reactos / drivers / dd / vga / display / makefile
1 # $Id: makefile,v 1.2 2000/03/17 21:02:57 jfilby Exp $
2 #
3 # Makefile for ReactOS vgaddi.dll
4 #
5 TARGET=vgaddi
6
7 BASE_CFLAGS = -I../../../../include
8
9 ifneq ($(HOST),mingw32-windows)
10 ifneq ($(HOST),mingw32-linux)
11 DLLTARGET=$(TARGET).a
12 else
13 DLLTARGET=$(TARGET).dll
14 endif
15 else
16 DLLTARGET=$(TARGET).dll
17 endif
18
19 all: $(DLLTARGET)
20
21 MAIN_OBJECTS = main/enable.o
22 OTHER_OBJECTS = objects/screen.o
23 RESOURCE_OBJECTS = $(TARGET).coff
24
25 OBJECTS = $(MAIN_OBJECTS) $(OTHER_OBJECTS) $(RESOURCE_OBJECTS)
26
27 $(TARGET).a: $(OBJECTS)
28 $(AR) csr $(TARGET).a $(OBJECTS)
29
30 $(TARGET).coff: $(TARGET).rc ../../../../include/reactos/resource.h
31
32 $(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
33 $(LD) -r $(OBJECTS) -o $(TARGET).o
34 $(DLLTOOL) \
35 --dllname $(TARGET).dll \
36 --def $(TARGET).def \
37 --kill-at \
38 --output-lib $(TARGET).a
39 $(CC) $(TARGET).o \
40 ../../../../subsys/win32k/win32k.a \
41 ../../../../ntoskrnl/ntoskrnl.a \
42 -specs=$(TARGET)_specs \
43 -mdll \
44 -o junk.tmp \
45 -Wl,--entry,_DrvEnableDriver \
46 -Wl,--base-file,base.tmp
47 - $(RM) junk.tmp
48 $(DLLTOOL) \
49 --dllname $(TARGET).dll \
50 --base-file base.tmp \
51 --output-exp temp.exp \
52 --def $(TARGET).edf
53 - $(RM) base.tmp
54 $(CC) $(TARGET).o \
55 ../../../../subsys/win32k/win32k.a \
56 ../../../../ntoskrnl/ntoskrnl.a \
57 -specs=$(TARGET)_specs \
58 -mdll \
59 -o $(TARGET).dll \
60 -Wl,--entry,_DrvEnableDriver \
61 -Wl,--image-base,0x70000000 \
62 -Wl,--file-alignment,0x1000 \
63 -Wl,--section-alignment,0x1000 \
64 -Wl,temp.exp
65 - $(RM) temp.exp
66 $(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
67
68 ifeq ($(DOSCLI),yes)
69 CLEAN_FILES = *.o *.coff *.sym *.tmp *.dll main\*.o
70 else
71 CLEAN_FILES = *.o *.coff *.sym *.tmp *.dll main/*.o
72 endif
73
74 clean: $(CLEAN_FILES:%=%_clean)
75
76 $(CLEAN_FILES:%=%_clean): %_clean:
77 - $(RM) $*
78
79 .PHONY: clean $(CLEAN_FILES:%=%_clean)
80
81 floppy: $(FLOPPY_DIR)/dlls/$(TARGET).dll
82
83 $(FLOPPY_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
84 ifeq ($(DOSCLI),yes)
85 $(CP) $(TARGET).dll $(FLOPPY_DIR)\dlls\$(TARGET).dll
86 else
87 $(CP) $(TARGET).dll $(FLOPPY_DIR)/dlls/$(TARGET).dll
88 endif
89
90 dist: $(DIST_DIR)/dlls/$(TARGET).dll
91
92 $(DIST_DIR)/dlls/$(TARGET).dll: $(TARGET).dll
93 ifeq ($(DOSCLI),yes)
94 $(CP) $(TARGET).dll ..\..\..\..\$(DIST_DIR)\dlls\$(TARGET).dll
95 else
96 $(CP) $(TARGET).dll ../../../../$(DIST_DIR)/dlls/$(TARGET).dll
97 endif
98
99 include ../../../../rules.mak
100
101 # EOF