Minor changes for making apps/baresh compile (tough it doesn't work yet).
[reactos.git] / posix / lib / psxdll / Makefile
1 # $Id: Makefile,v 1.3 2002/02/24 22:14:05 ea Exp $
2
3 PATH_TO_TOP = ../../../..
4
5 TARGET_TYPE = dynlink
6
7 TARGET_NAME = psxdll
8
9 TARGET_LIBPATH = $(PATH_TO_TOP)/dk/psx/lib
10
11 TARGET_LFLAGS = -nostartfiles
12
13 TARGET_SDKLIBS = ntdll.a
14
15 TARGET_BASE = 0x68EB0000
16
17 TARGET_ENTRY = _DllMain@12
18
19 TARGET_CFLAGS =\
20 -W \
21 -nostdinc \
22 -nostdlib \
23 -fno-builtin \
24 -I$(PATH_TO_TOP)/subsys/psx/include \
25 -I$(PATH_TO_TOP)/include \
26 -D__PSXDLL__ \
27 -D__PSX_DEBUG_WANT_ALL__
28
29 TARGET_OBJECTS = $(TARGET_NAME).o
30
31 TARGET_CLEAN = $(OBJECTS)
32
33 include $(PATH_TO_TOP)/rules.mak
34 include $(TOOLS_PATH)/helper.mk
35
36 OBJECTS_MISC = \
37 misc/main.o \
38 misc/init.o \
39 misc/heap.o \
40 misc/interlock.o \
41 misc/safeobj.o \
42 misc/path.o \
43 misc/fdtable.o
44
45 OBJECTS_DIRENT = \
46 dirent/opendir.o \
47 dirent/readdir.o \
48 dirent/closedir.o
49
50 OBJECTS_DLFCN = \
51 dlfcn/dlopen.o \
52 dlfcn/dlclose.o \
53 dlfcn/dlsym.o \
54 dlfcn/dlerror.o
55
56 OBJECTS_ERRNO = \
57 errno/errno.o
58
59 OBJECTS_FCNTL = \
60 fcntl/open.o \
61 fcntl/fcntl.o
62
63 OBJECTS_LIBGEN = \
64 libgen/basename.o
65
66 OBJECTS_SCHED = \
67 sched/yield.o
68
69 OBJECTS_SIGNAL = \
70 pthread/kill.o \
71 signal/raise.o
72
73 OBJECTS_STDLIB = \
74 stdlib/abort.o \
75 stdlib/malloc.o \
76 stdlib/exit.o
77
78 OBJECTS_STRING = \
79 string/strdup.o \
80 string/strerror.o
81
82 OBJECTS_PTHREAD = \
83 pthread/create.o \
84 pthread/exit.o \
85 pthread/join.o \
86 pthread/mutex.o \
87 pthread/self.o
88
89 OBJECTS_SYS_UTSNAME = \
90 sys/utsname/uname.o
91
92 OBJECTS_UNISTD = \
93 unistd/close.o \
94 unistd/dup.o \
95 unistd/getcwd.o \
96 unistd/getpid.o \
97 unistd/getppid.o
98
99 OBJECTS = \
100 $(OBJECTS_MISC) \
101 $(OBJECTS_DIRENT) \
102 $(OBJECTS_DLFCN) \
103 $(OBJECTS_ERRNO) \
104 $(OBJECTS_FCNTL) \
105 $(OBJECTS_LIBGEN) \
106 $(OBJECTS_SCHED) \
107 $(OBJECTS_SIGNAL) \
108 $(OBJECTS_STDLIB) \
109 $(OBJECTS_STRING) \
110 $(OBJECTS_PTHREAD) \
111 $(OBJECTS_SYS_UTSNAME) \
112 $(OBJECTS_UNISTD)
113
114 DEP_OBJECTS = $(OBJECTS)
115
116 include $(TOOLS_PATH)/depend.mk
117
118 $(TARGET_NAME).o: $(OBJECTS)
119 $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o
120
121 DTFLAGS = -k -l $@
122
123 $(TARGET_NAME).a: $(TARGET_NAME).def
124 $(DLLTOOL) \
125 $(DTFLAGS) \
126 -D $(TARGET_NAME).dll \
127 -d $(TARGET_NAME).def
128
129 # EOF