New calls and new exported functions
[reactos.git] / posix / lib / psxdll / Makefile
1 # $Id: Makefile,v 1.8 2002/05/17 02:21:54 hyperion 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 -Wall \
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) csrapi.a
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/spawn.o \
43 misc/path.o \
44 misc/pdata.o \
45 misc/fdtable.o \
46 misc/tls.o
47
48 OBJECTS_DIRENT = \
49 dirent/opendir.o \
50 dirent/readdir.o \
51 dirent/closedir.o
52
53 OBJECTS_DLFCN = \
54 dlfcn/dlopen.o \
55 dlfcn/dlclose.o \
56 dlfcn/dlsym.o \
57 dlfcn/dlerror.o
58
59 OBJECTS_ERRNO = \
60 errno/errno.o
61
62 OBJECTS_FCNTL = \
63 fcntl/open.o \
64 fcntl/fcntl.o
65
66 OBJECTS_LIBGEN = \
67 libgen/basename.o
68
69 OBJECTS_SCHED = \
70 sched/yield.o
71
72 OBJECTS_SIGNAL = \
73 pthread/kill.o \
74 signal/raise.o
75
76 OBJECTS_STDLIB = \
77 stdlib/abort.o \
78 stdlib/malloc.o \
79 stdlib/exit.o
80
81 OBJECTS_STRING = \
82 string/strdup.o \
83 string/strerror.o
84
85 OBJECTS_PTHREAD = \
86 pthread/create.o \
87 pthread/exit.o \
88 pthread/join.o \
89 pthread/mutex.o \
90 pthread/self.o
91
92 OBJECTS_SYS_STAT = \
93 sys/stat/chmod.o \
94 sys/stat/mkdir.o \
95 sys/stat/mkfifo.o \
96 sys/stat/mknod.o \
97 sys/stat/stat.o \
98 sys/stat/umask.o
99
100 OBJECTS_SYS_UTSNAME = \
101 sys/utsname/uname.o
102
103 OBJECTS_UNISTD = \
104 unistd/access.o \
105 unistd/close.o \
106 unistd/dup.o \
107 unistd/fork.o \
108 unistd/getcwd.o \
109 unistd/getpid.o \
110 unistd/getppid.o \
111 unistd/read.o \
112 unistd/sleep.o \
113 unistd/write.o
114
115 OBJECTS = \
116 $(OBJECTS_MISC) \
117 $(OBJECTS_DIRENT) \
118 $(OBJECTS_DLFCN) \
119 $(OBJECTS_ERRNO) \
120 $(OBJECTS_FCNTL) \
121 $(OBJECTS_LIBGEN) \
122 $(OBJECTS_SCHED) \
123 $(OBJECTS_SIGNAL) \
124 $(OBJECTS_STDLIB) \
125 $(OBJECTS_STRING) \
126 $(OBJECTS_PTHREAD) \
127 $(OBJECTS_SYS_STAT) \
128 $(OBJECTS_SYS_UTSNAME) \
129 $(OBJECTS_UNISTD)
130
131 DEP_OBJECTS = $(OBJECTS)
132
133 include $(TOOLS_PATH)/depend.mk
134
135 DTFLAGS = -k -l $@
136
137 $(TARGET_NAME).a: $(TARGET_NAME).def
138 $(DLLTOOL) \
139 $(DTFLAGS) \
140 -D $(TARGET_NAME).dll \
141 -d $(TARGET_NAME).def
142
143 csrapi.a: csrapi.def
144 $(DLLTOOL) \
145 $(DTFLAGS) \
146 -D ntdll.dll \
147 -d csrapi.def
148
149 $(TARGET_NAME).o: csrapi.a $(OBJECTS)
150 $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o
151
152
153 # EOF