Rev 5022 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4363 | Serge | 1 | LIBRARY= libdrm |
2 | |||
4866 | Serge | 3 | CC = kos32-gcc |
4 | AR = kos32-ar |
||
5 | LD = kos32-ld |
||
6 | STRIP = kos32-strip |
||
6531 | serge | 7 | |
8 | INSTALLDIR:= /home/autobuild/tools/win32/lib |
||
9 | |||
10 | INCLUDES= -I. -I./include/drm -I../newlib/libc/include |
||
4866 | Serge | 11 | |
6531 | serge | 12 | CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -D_POSIX_TIMERS -D_POSIX_MONOTONIC_CLOCK |
13 | CFLAGS+= -c -march=i686 -O2 -fno-ident -fomit-frame-pointer |
||
4363 | Serge | 14 | |
6531 | serge | 15 | LDFLAGS:= -shared -s -T dll.lds --entry _DllStartup --version-script libdrm.ver --image-base=0 |
4866 | Serge | 16 | LDFLAGS+= --out-implib $(LIBRARY).dll.a |
4363 | Serge | 17 | |
4866 | Serge | 18 | ARFLAGS = crs |
4363 | Serge | 19 | |
20 | LIBS:= -ldll -lc.dll |
||
21 | |||
22 | DEFINES= |
||
23 | |||
24 | SOURCES = xf86drm.c \ |
||
25 | intel/intel_bufmgr.c \ |
||
26 | intel/intel_bufmgr_gem.c |
||
27 | |||
28 | OBJECTS = $(patsubst %.c, %.o, $(SOURCES)) |
||
29 | |||
30 | # targets |
||
31 | |||
32 | all:$(LIBRARY).a $(LIBRARY).dll |
||
33 | |||
34 | |||
35 | $(LIBRARY).a: $(OBJECTS) Makefile |
||
4866 | Serge | 36 | $(AR) $(ARFLAGS) $(LIBRARY).a $(OBJECTS) |
6531 | serge | 37 | mv -f $(LIBRARY).a $(INSTALLDIR) |
4363 | Serge | 38 | |
39 | $(LIBRARY).dll: $(OBJECTS) Makefile |
||
6531 | serge | 40 | $(LD) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS) |
4363 | Serge | 41 | mv -f $@ ../../bin |
6531 | serge | 42 | mv -f $(LIBRARY).dll.a $(INSTALLDIR) |
4363 | Serge | 43 | |
44 | %.o : %.c Makefile |
||
45 | $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< |
||
46 | |||
47 | clean: |
||
48 | -rm -f *.o |
||
49 | |||
50 | |||
51 |