60 lines
1.5 KiB
Plaintext
60 lines
1.5 KiB
Plaintext
# File: makefile
|
||
|
||
# Compiler flags.
|
||
CC = gcc
|
||
LD = g++
|
||
|
||
FINAL = 1
|
||
|
||
# Compiler flags.
|
||
|
||
CPPFLAGS = -Wall -O2 `wx-config --cxxflags`
|
||
|
||
LDFLAGS =
|
||
|
||
EDACPPFLAGS = $(CPPFLAGS)
|
||
|
||
include ../libs.macosx
|
||
|
||
|
||
TARGET = cvpcb
|
||
|
||
all: $(TARGET) $(TARGET).app
|
||
|
||
include makefile.include
|
||
|
||
CPPFLAGS += $(EXTRACPPFLAGS)
|
||
CPPFLAGS += -arch i386 -arch ppc
|
||
EDACPPFLAGS = $(CPPFLAGS)
|
||
|
||
|
||
$(TARGET): $(OBJECTS) $(TARGET).r makefile.macosx makefile.include $(EXTRALIBS) ../libs.macosx $(LIBVIEWER3D)
|
||
$(LD) $(OBJECTS) $(LDFLAGS) $(LIBVIEWER3D) $(LIBS3D) -o $(TARGET)
|
||
$(RESCOMP) -o $(TARGET) Carbon.r $(TARGET).r
|
||
$(SETFILE) -a C $(TARGET)
|
||
|
||
|
||
$(TARGET).app: $(OBJS)
|
||
rm -Rf $(TARGET).app
|
||
mkdir -p $(TARGET).app
|
||
mkdir -p $(TARGET).app/Contents
|
||
mkdir -p $(TARGET).app/Contents/MacOS
|
||
mkdir -p $(TARGET).app/Contents/Frameworks
|
||
mkdir -p $(TARGET).app/Contents/Resources
|
||
sed -e "s/IDENTIFIER/`echo . | sed -e ’s,\.\./,,g’ | sed -e ’s,/,.,g’`/" -e "s/EXECUTABLE/$(TARGET)/" \
|
||
-e "s/VERSION/$(MKMK_WX_VERSION)/" $(HOME)/wxMac-$(MKMK_WX_VERSION)/src/mac/carbon/wxmac.icns \
|
||
>$(TARGET).app/Contents/Resources/wxmac.icns
|
||
sed -e "s/IDENTIFIER/`echo . | sed -e ’s,\.\./,,g’ | sed -e ’s,/,.,g’`/" -e "s/EXECUTABLE/$(TARGET)/"\
|
||
-e "s/VERSION/$(MKMK_WX_VERSION)/" $(HOME)/wxMac-$(MKMK_WX_VERSION)/src/mac/carbon/Info.plist.in \
|
||
>$(TARGET).app/Contents/Info.plist
|
||
echo -n "APPL????" >$(TARGET).app/Contents/PkgInfo
|
||
ln -f $(TARGET) $(TARGET).app/Contents/MacOS/$(TARGET)
|
||
|
||
install:
|
||
cp -f $(TARGET) $(KICAD_BIN)
|
||
|
||
clean:
|
||
rm *.o
|
||
rm $(TARGET)
|
||
|