-
Notifications
You must be signed in to change notification settings - Fork 8
/
makefile
64 lines (53 loc) · 1.36 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
ARCH = mingw32
PROGRAM = VCam
TARGET = $(PROGRAM).ax
CC = $(ARCH)-gcc
CXX = $(ARCH)-g++
STRIP = $(ARCH)-strip
RM = rm -f
CFLAGS = -O2 -mwindows -Iinclude
LIBS = -lole32 -luuid -loleaut32 -lwinmm -lstrmiids
LDFLAGS = -shared $(CFLAGS)
OBJDIR = .objs$(ARCH)
INSTALL_PATH = "C:\\WINDOWS\\System32\\"
OBJS = \
$(OBJDIR)/Dll.o \
$(OBJDIR)/Filters.def \
$(OBJDIR)/Filters.o \
$(OBJDIR)/mbase_dllentry.o \
$(OBJDIR)/mbase_amfilter.o \
$(OBJDIR)/mbase_amvideo.o \
$(OBJDIR)/mbase_wxutil.o \
$(OBJDIR)/mbase_wxlist.o \
$(OBJDIR)/mbase_combase.o \
$(OBJDIR)/mbase_dllsetup.o \
$(OBJDIR)/mbase_mtype.o \
$(OBJDIR)/mbase_source.o
all: $(OBJDIR) $(TARGET)
$(OBJDIR):
mkdir -p $@
$(OBJDIR)/%.o: %.c
@echo Compiling $@
@$(CC) $(CFLAGS) -c $< -o $@
$(OBJDIR)/%.o: %.cpp
@echo Compiling $@
@$(CXX) $(CFLAGS) -fpermissive -c $< -o $@
$(TARGET): $(OBJS)
@echo Linking $@
$(CXX) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) $(LIBSX)
@$(STRIP) $@
$(OBJDIR)/%.def: makefile
@echo Creating $@
@echo 'LIBRARY "$(TARGET)"' >$@
@echo 'EXPORTS' >>$@
@echo 'DllMain PRIVATE' >>$@
@echo 'DllGetClassObject PRIVATE' >>$@
@echo 'DllCanUnloadNow PRIVATE' >>$@
@echo 'DllRegisterServer PRIVATE' >>$@
@echo 'DllUnregisterServer PRIVATE' >>$@
install: $(OBJDIR) $(TARGET)
@echo Installing $(TARGET)...
@cp $(TARGET) $(INSTALL_PATH)
clean:
$(RM) -r $(OBJDIR)
$(RM) ./*.ax