Makefile 1.15 KB
Newer Older
Ercan Ersoy's avatar
Ercan Ersoy committed
1
# Makefile - Build FreeDOS TUI Shell
Ercan Ersoy's avatar
Ercan Ersoy committed
2 3
# Written by Ercan Ersoy.

Ercan Ersoy's avatar
Ercan Ersoy committed
4
# Directory variables
Ercan Ersoy's avatar
Ercan Ersoy committed
5

Ercan Ersoy's avatar
Ercan Ersoy committed
6 7 8
LIB=lib
INCLUDE=include
SRC=src
9
OBJ=src
Ercan Ersoy's avatar
Ercan Ersoy committed
10
BIN=bin
Ercan Ersoy's avatar
Ercan Ersoy committed
11

Ercan Ersoy's avatar
Ercan Ersoy committed
12
# Command variables
13

Ercan Ersoy's avatar
Ercan Ersoy committed
14 15 16 17 18 19
CPP=wpp
LINK=wlink

# Command flags

CPPFLAGS=-mm -0 -bt=DOS
20
LINKFLAGS=system dos op stack=4096
Ercan Ersoy's avatar
Ercan Ersoy committed
21 22 23

# Objects

24 25 26 27
OBJECTS=$(OBJ)\common.obj &
$(OBJ)\fm.obj &
$(OBJ)\run.obj &
$(OBJ)\main.obj &
Ercan Ersoy's avatar
Ercan Ersoy committed
28 29 30 31 32 33 34 35
$(LIB)\kitten\kitten.obj &
$(LIB)\fdostui\lib\fdtuid16.lib

# Directives

all: $(BIN)\dosshell.exe

$(BIN)\dosshell.exe: $(OBJECTS)
36
	$(LINK) $(LINKFLAGS) name $@ file @link.lbc
Ercan Ersoy's avatar
Ercan Ersoy committed
37
 
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
$(OBJ)\common.obj: $(SRC)\common.cpp
	$(CPP) $(CPPFLAGS) &
-i=$(LIB)\fdostui\include &
-i=$(LIB)\kitten &
-i=$(INCLUDE) &
$? &
-fo=$@

$(OBJ)\fm.obj: $(SRC)\fm.cpp
	$(CPP) $(CPPFLAGS) &
-i=$(LIB)\fdostui\include &
-i=$(LIB)\kitten &
-i=$(INCLUDE) &
$? &
-fo=$@

$(OBJ)\run.obj: $(SRC)\run.cpp
	$(CPP) $(CPPFLAGS) &
-i=$(LIB)\fdostui\include &
-i=$(LIB)\kitten &
-i=$(INCLUDE) &
$? &
-fo=$@
Ercan Ersoy's avatar
Ercan Ersoy committed
61

62
$(OBJ)\main.obj: $(SRC)\main.cpp
Ercan Ersoy's avatar
Ercan Ersoy committed
63 64 65 66 67 68
	$(CPP) $(CPPFLAGS) &
-i=$(LIB)\fdostui\include &
-i=$(LIB)\kitten &
-i=$(INCLUDE) &
$? &
-fo=$@
69 70

clean-obj: .SYMBOLIC
Ercan Ersoy's avatar
Ercan Ersoy committed
71
	@if exist $(OBJ)\*.obj del $(OBJ)\*.obj